Sometimes, we want to set navigation timeout with Node.js Puppeteer and JavaScript.
In this article, we’ll look at how to set navigation timeout with Node.js Puppeteer and JavaScript.
How to set navigation timeout with Node.js Puppeteer and JavaScript?
To set navigation timeout with Node.js Puppeteer and JavaScript, we can set the timeout option.
For instance, we write
await page.goto(url, { waitUntil: "load", timeout: 0 });
to call goto with the url we want to go to.
We set timeout to 0 to time out immediately.
Conclusion
To set navigation timeout with Node.js Puppeteer and JavaScript, we can set the timeout option.