pageLoadTimeout() sets the amount of time to wait for a page load to complete before throwing a TimeoutException.
pageLoadTimeout()
pageLoadTimeout()
sets the amount of time to wait for a page load to complete before throwing a TimeoutException. If the timeout is negative, page loads can be indefinite.
Implementation
Java:
driver.manage().timeouts().pageLoadTimeout(2, TimeUnit.SECONDS);
Python:
driver.set_page_load_timeout(2)