Wait for page load in Selenium (C#)

Wait for page load in Selenium (C#)

To wait until the page is loaded, the easiest way is to use a WebDriverWait to force the driver to wait until an element is visible that you know is only present on the page you are navigating to.You can do this using WebDriverWait.

WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));

Leave a reply

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

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.