Categories
JavaScript Answers

How to set navigation timeout with Node.js Puppeteer and JavaScript?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *