Try use old way of setting page load timeout if new way fails. Fixes
The release version of Firefox doesnt have the latest W3C setPageTimeout
algorithm. If the W3C version fails, try the old way.
@@ -722,10 +722,10 @@ class WebDriver(object):
:Usage:
driver.set_page_load_timeout(30)
"""
- if self.w3c:
+ try:
self.execute(Command.SET_TIMEOUTS, {
'pageLoad': int(float(time_to_wait) * 1000)})
- else:
+ except WebDriverException:
self.execute(Command.SET_TIMEOUTS, {
'ms': float(time_to_wait) * 1000,
'type': 'page load'})
