puppeteer-extra-plugin-click-and-wait

2.3.3 • Public • Published

puppeteer-extra-plugin-click-and-wait

A plugin for puppeteer-extra.

Install

yarn add puppeteer-extra-plugin-click-and-wait

API

Table of Contents

Plugin

Extends: PuppeteerExtraPlugin

Convenience function to wait for navigation to complete after clicking on an element.

Adds a new page.clickAndWaitForNavigation(selector, clickOptions, waitOptions) method.

See this issue for more context: https://github.com/GoogleChrome/puppeteer/issues/1421

Note: Be wary of ajax powered pages where the navigation event is not triggered.

Type: function (opts)

  • opts (optional, default {})

Example:

await page.clickAndWaitForNavigation('input#submitData')

// as opposed to:

await Promise.all([
  page.waitForNavigation(waitOptions),
  page.click('input#submitData', clickOptions),
])

Package Sidebar

Install

npm i puppeteer-extra-plugin-click-and-wait

Weekly Downloads

175

Version

2.3.3

License

MIT

Unpacked Size

5.08 kB

Total Files

5

Last publish

Collaborators

  • berstend