popform

0.1.2 • Public • Published

popform

Autopopulate and submit web forms

Usage

npm install --save popform
import popform from 'popform';
 
const config = [
  {
    delay: 10000, // wait for the page to load
    fields: { // fields to populate
      username: {
        value: 'some-username'
      },
      password: 'some-password' // string assumed to be value
    },
    elements: [ // elements to modify
      {
        query: '.box',
        style: {
          backgroundColor: 'blue'
        }
      }
    ],
    submit: '#submit' // location of submit button
  },
  {
    // Autopopulate second form after first form is submitted
  }
];
  
popform(config).then(() => {
  console.log('Form autopopulated and submitted');
});

Readme

Keywords

none

Package Sidebar

Install

npm i popform

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • codejamninja