5.0.0 • Published 2 years ago

oi-grease v5.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

puppeteer-helpers

Bunch of help methods for e2e automation testing via Puppeteer

Purpose

Several examples why library exists:

  • You always have some troubles with click? waitForSelector() does not help sometimes and you use $eval(selector, (node) => node.click()? Please, stop clicking using JS if you write e2e UI tests. Our user does not interact with browser in such maner!

Was:

    await page.waitForSelector(selector, { timeout:30000 });
    await page.$eval(selector, (e: any) => e.click());

with Grease:

await click(page, selector);

click() will wait when Puppeteer find element and also when element become visible.

Library has other useful methods in API.md (TBD)

  • You aware Puppeteer does not have getText() method, strange but truth

    Was:

     await page.waitForSelector(selector);
     const text = await page.$eval(selector, (el: any) => el.innerText);

    with Grease:

    const text = await getText(page, selector);

getText() will wait when Puppeteer find element and also when element become visible. Only after that get text of element.

API

TBD

Contribution guide

TBD

5.0.0

2 years ago

4.1.0

2 years ago

4.0.0

2 years ago

3.0.0

3 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.3

4 years ago

1.6.2

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago