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.
@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.
When there's a navigation event (which it looks like the plugin is sensitive to), the outputted script should probably do:
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