checkly / headless-recorder

Chrome extension that records your browser interactions and generates a Playwright or Puppeteer script.
https://checklyhq.com/headless-recorder
MIT License
15.03k stars 722 forks source link

Support for page.waitForNavigation #2

Closed joelgriffith closed 6 years ago

joelgriffith commented 6 years ago

When there's a navigation event (which it looks like the plugin is sensitive to), the outputted script should probably do:

await page.waitForNavigation()

Otherwise the "next" task might get lost in execution. This can be tricky to orchestrate since you want to have this happen immediately after a click, but not await the click event that causes the navigation, so it's a bit awkward.

https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions

joelgriffith commented 6 years ago

I'd be more than happy to do an initial PR for this!

tnolet commented 6 years ago

@joelgriffith Yes, this is number one on the list for new events & code-generator functions. PR is more than welcome. Please look at the following items.