Sunday, January 11, 2015

WebDriver - pageLoadTimeout()

WebDriver - pageLoadTimeout()

pageLoadTimeout(): It sets the amount of time to wait for a page load to complete before giving an error. In case of negative timeout, page loads can be indefinite.

Below code can be used to implement pageLoadTimeout():
driver.manage().timeouts().pageLoadTimeout(100, SECONDS);

Some of the other links which talk more about pageLoadTimeout():
1. Page load timeout is implemented in Selenium/WebDriver. [Link]
2. Set up a real timeout for loading page in Selenium WebDriver? [Link]
3. Waiting after web page interactions. [Link]
4. How to stop Page load in Selenium Webdriver. [Link]
5. Checking the Web Page load time using WebDriver. [Link]
6. Program will block when page load time out. [Link]

Related posts:
WebDriverWait, ImplicitlyWait & ExplictlyWait
WebDriver - Wait for page load