Closed iofjuupasli closed 1 year ago
Have you tried await page.waitForNavigation()
in your navigationPromise constant? Perhaps you could call it like that instead of navigationPromise.
@ChrisPrzR the code is generated by headless-recorder. The idea of waitForNavigation
method is that it should called before navigation, and await
after navigation begins
@iofjuupasli thanks for reporting it. We are currently working to make a better code and selector generation. Will keep you updated!
Usually Promise can be resolved only once
https://github.com/puppeteer/puppeteer/blob/main/experimental/puppeteer-firefox/lib/FrameManager.js#L167-L210
I thought maybe it has some different behavior for
waitForNavigation
, but didn't found that in puppeteer source code.So in this example:
The second and third
await navigationPromise
do nothing actually