Wait for iframe navigation
See original GitHub issueHow I can wait for an iframe that triggers a post
to server?
Following is not working
script1: //not working
const [response] = await Promise.all([
page.waitForNavigation()
page.click("#iframe_1");
]);
script2: //not working
await page.waitForSelector("#iframe_1");
I need to wait for post
response but I frame does not causes a page navigation the looks like waitForSelector
will not works
Could you suggest a strategy to follow?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Wait for iframe to load in JavaScript - Stack Overflow
First of all, I believe you are supposed to affect the src property of iframes, not location . Second of all, hook the...
Read more >Capturing the load event of an iFrame — A case study
The DOM emits the load event on iFrame only when all the static assets have been downloaded and all the elements in the...
Read more >How to check a webpage is loaded inside an iframe or into the ...
An iFrame is a rectangular frame or region in the webpage to load or display another separate webpage or document inside it.
Read more >Page: DOMContentLoaded, load, beforeunload, unload
The load event on the window object triggers when the whole page is loaded including styles, images and other resources. This event is...
Read more >How to make Puppeteer wait for Iframe to finish loading? : r/node
I see you've already tried .waitForNavigation() , but that's more intended for times when navigation is indirectly triggered. I think using it ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
page.frames()
?frame.select()
, notpage.select()
(and without extraaway
).So can you try this:
@AlonsoK28 you can use
frame.waitForNavigation
to wait for navigation of a particular frame.Note: this API is available in Puppeteer v1.9.0+.