It's benefit to support ElementHandle.waitForSelector method
See original GitHub issueIn browser, we can use querySelector method like this:
const div = document.querySelector('div'); // lookup "div" globally
const span = div.querySelector('span'); // lookup "span" locally, that is bounded to div's scope
It’s helpful to provide waitForSelector method on ElementHandle, thus we can wait for selector locally that is bounded to the ElementHandle instance.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
It's benefit to support ElementHandle.waitForSelector method
It's helpful to provide waitForSelector method on ElementHandle, thus we can wait for selector locally that is bounded to the ElementHandle ...
Read more >ElementHandle.waitForSelector() method - Puppeteer
Wait for an element matching the given selector to appear in the current element. Unlike Frame.waitForSelector(), this method does not work across navigations...
Read more >Migrating from Puppeteer to Playwright - DEV Community
The switch from Puppeteer to Playwright is easy. But is it worth it? And how exactly does one migrate existing scripts from one...
Read more >Puppeteer waitForSelector - tools4testing
waitForSelector method returns the promise with element handle which is represented by the selector expression and null if element is not found after...
Read more >Puppeteer - Quick Guide - Tutorialspoint
To identify it using the ElementHandle method on the page, the expression should be as ... Puppeteer supports headless execution and hence 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
Great work by JoelEinbinder and aslushnikov. Eagerly waiting to see the
waitFor*
functions support to wait forelementHandle
in the next Puppeteer release.With 05b1aca21e5c2f221373d601d3b8ae6b2a984292 you should be able to do something like this.
Warning, untested code ahead: