freezed script
See original GitHub issueHi!
Is it possible to somehow stop (set a pause) the script. For example, when a modal window appears, stop the script execution, while closing the window, then defrost the script. I try this:
await page.waitForSelector('div[class="popup _active"]').then(async()=>{
console.log('catch popup');
page.click('span[class="submit"]').then(()=>{
console.log('click confirm');
});
await page.waitForSelector('div[class="popup _active"]',{hidden:true}).then(()=>{
console.log('el hidden');
});
});
But it does not freeze script.
Is it possible to implement without using flags to make the script more flexible?
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Frozen script - The Internet Movie Script Database (IMSDb)
FROZEN Written by Jennifer Lee Final Shooting Draft 9/23/13 OPEN ON: ICE. We're underwater looking up at it. A saw cuts through, heading...
Read more >Frozen (2013)/Transcript | Moviepedia - Fandom
Transcript. [first lines; a group of mountain men are saw through a frozen lake singing "Frozen Heart"]; Ice Harvesters: Born of cold and...
Read more >Frozen Script PDF Download: Songs, Quotes, and Ending
Frozen • Let It Go · “You can't marry a man you just met.” · “Ice is my life!” · “I could kiss...
Read more >Frozen Movie Script - Scripts.com
Synopsis: When their kingdom becomes trapped in perpetual winter, fearless Anna (Kristen Bell) joins forces with mountaineer Kristoff ...
Read more >Frozen-Jr- Master-Script.pdf - Myart.org
Frozen JR. Script. Let the Sun Shine On...... A Little Bit of You..
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
Sure, I’ll close this for now. Feel free to re-file with more details if you continue to experience issues.
@Trahtenberg I’d appreciate an explanation in layman terms that doesn’t refer to code - to help us understand what’s going on.
if you’re testing your own website, then I’d recommend set up certain hooks on the page that help you test it. The usual practice is to use data attributes on elements and then wait/query for them with
page.waitForSelector
/page.$
. Other nice approach is to useconsole.timeStamp
to yield certain events - you can listen to them on the puppeteer side usingpage.on('metrics')
event.If you’re dealing with a website as a black box, then there’s no silver bullet and all solutions vary a lot in creativity. Sometimes tracking certain network requests using
page.on('requestfinished')
works nicely, sometimes there’s a specific DOM element that you can wait for.