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.