Categories
JavaScript Answers

How to wait for page load after form submit with Puppeteer and JavaScript?

Spread the love

Sometimes, we want to wait for page load after form submit with Puppeteer and JavaScript.

In this article, we’ll look at how to wait for page load after form submit with Puppeteer and JavaScript.

How to wait for page load after form submit with Puppeteer and JavaScript?

To wait for page load after form submit with Puppeteer and JavaScript, we can use the waitForNavigation method.

For instance, we write

await page.waitForNavigation();

in our script to call the page.waitForNavigation method to wait for the page to load after submitting a form.

Conclusion

To wait for page load after form submit with Puppeteer and JavaScript, we can use the waitForNavigation method.

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 *