Blog

Wait for page load in Selenium (Python)

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.

wait = WebDriverWait(self.driver, 10)
element = wait.until(ec.visibility_of_element_located((By.ID, "searchInput")))

Pages