New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support waitForNavigation for frames #2918
Comments
@hlr1983 Your click navigates a frame rather than a page; unfortunately, we don't currently support waiting for navigation for frames. One workaround would be to listen for await Promise.all([
leftFrame.click('a[href="option2.html"]'),
new Promise(resolve => page.once('framenavigated', resolve))
]); |
I'm running into this same issue in my use case. Even if I use the suggestion that @aslushnikov posted, Hope that PR gets merged soon. |
This patch unifies logic in response trackign in page.goto and page.waitForNavigation. As a drive-by, we now make sure that we return the right response for the right frame. This will come handy for future frame navigation API. References puppeteer#2918
This patch: - moves implementation of page.goto and page.waitForNavigation into FrameManager. The defaultNavigationTimeout gets moved to FrameManager as well. - moves NavigatorWatcher into FrameManager to avoid circular dependency References #2918
This patch introduces API to manage frame navigations. As a drive-by, the `response.frame()` method is added as a shortcut for `response.request().frame()`. Fixes puppeteer#2918.
This patch introduces API to manage frame navigations. As a drive-by, the `response.frame()` method is added as a shortcut for `response.request().frame()`. Fixes #2918.
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
What is the expected result?
I was expecting navigationPromise to be resolved, but it doesn't.
What happens instead?
navigationPromise isn't resolved. Is it the expected behavior? Is it possible to add a frame.waitForNavigation() function?
Screenshot:
Thanks
PS: I've also tried with the code below, using waitForNavigation as suggested in frame.click() documentation:
The text was updated successfully, but these errors were encountered: