Implement setDefaultWaitTimeout or setDefaultTimeouts
See original GitHub issueRight now we have page.setDefaultNavigationTimeout(timeout)
which is very useful. If we want to take things forward, we can implement the following,
setDefaultWaitTimeout(timeout)
This will help set a default timeout for waitFor
function or similar to those. There are obviously more waitFor
use cases than goto
.
setDefaultTimeouts({ navigation: timeout, waitFor: timeout })
Same like above, this will let one update all timeouts at once or just the one they want. Will remove the need for setDefaultNavigationTimeout
or setDefaultWaitTimeout
if happens and window for more useful api
PS: I have a project where I have at least thousands of waitFor cases for some reason and hundreds of navigation calls, this feels really promising in that sense where people have lots of test cases.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (4 by maintainers)
Top Results From Across the Web
puppeteer 1.12.0 on Node.js Yarn
New page.setDefaultTimeout(timeout) allows controlling default timeout for all page operations. Puppeteer now ships a .d.ts file for better TypeScript support.
Read more >puppeteer-core: Versions
evaluate freezes / hangs on detached frames. #3319 - Implement setDefaultWaitTimeout or setDefaultTimeouts; #3327 - Puppeteer page.select got error: Cannot read ...
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
We’ve discussed this with @JoelEinbinder and really liked the following approach.
page.setDefaultTimeout(number)
method. This overrides all timeouts we use for navigations and waitFor* methods.page.setDefaultTimeout
to accept an object with a set of per-method configuration methods:Let me know what you think.
Hi Gurus,
Have this been implemented? I tried to use this setting but getting this error message.