1.3.1 • Published 4 years ago

puppeteer-tools v1.3.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Docs

API reference

Why use puppeteer-tools

  • You want to have your e2e tests less coupled to your code and acting more like a real user
  • You don't have a QA team and you want to have some e2e tests to make sure that main user flow will not break, so you need to write it as fast and easily as you can.

Installation

npm i puppeteer-tools

puppeteer-tools is like a plugin to puppeteer, so you need to install it too.

npm i puppeteer

Getting Started

import puppeteer from 'puppeteer';
import createPuppeteerTools from 'puppeteer-tools';

const browser = await puppeteer.launch();
const page = await browser.newPage();

const puppeteerTools = createPuppeteerTools(page);

await page.goto('http://myapp.com/login');
await puppeteerTools.form.fill([
  {
    data: 'mylogin',
    label: 'Login',
    type: 'text',
  },
  {
    data: 'mypass',
    label: 'Password',
    type: 'text',
  },
]);
await Promise.all([
  page.waitForNavigation(),
  page.click('button[type=submit]'),
]);

Coming soon

  • More input types (check, radio, textarea, ...)
  • Custom input types
  • Possibility to execute some action between inputs fill in form.fill

Contributing

Not organized yet, so for now reach me on twitter @lebreRafael or just open issues and PRs

1.3.1

4 years ago

1.2.0

4 years ago

1.3.0

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago