1

I use watir webdriver gem with chromedriver. I know (https://code.google.com/p/chromedriver/issues/detail?id=9#c25) that in new version 2.1 of chromedriver there is a special page load timeout. How can I set it from ruby code?

Molfar
  • 1,411
  • 3
  • 18
  • 49
  • Does this help? http://stackoverflow.com/questions/9014121/how-do-i-change-the-page-load-timeouts-in-watir-webdriver-timeout-in-click-met – orde Aug 06 '13 at 19:25
  • no, that is not about page load timeout. – Molfar Aug 07 '13 at 08:45

1 Answers1

5

There is a page load timeout that specifies how long to wait for a page to load before throwing an exception.

This is set within the underlying selenium-webdriver object:

browser.driver.manage.timeouts.page_load = 10 #seconds

For example, an exception will now be thrown when a page does not load fast enough:

browser = Watir::Browser.new :chrome
browser.driver.manage.timeouts.page_load = 0
browser.goto 'http://www.google.ca'
#=> Selenium::WebDriver::Error::TimeOutError
Justin Ko
  • 46,526
  • 5
  • 91
  • 101