- Instant help with your JavaScript coding problems

Set navigation timeout in Puppeteer

Question:
How to set navigation timeout in Puppeteer?
Answer:
page.setDefaultNavigationTimeout(0);
Description:

By default, the Puppeteer navigation timeout is set to 30 seconds. For very complex web pages this can sometimes be too little and cause a TimeError:

TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded

The timeout value can be easily changed using the setDefaultNavigationTimeout function. You can set a higher value or turn it off completely if you set the value to 0 .

Share "How to set navigation timeout in Puppeteer?"
Tags:
puppeteer, navigation, load, timeout, exceeded, TimoutError
Technical term:
Set navigation timeout in Puppeteer