Skip to content

Commit

Permalink
Try use old way of setting page load timeout if new way fails. Fixes S…
Browse files Browse the repository at this point in the history
…eleniumHQ#3654

The release version of Firefox doesnt have the latest W3C setPageTimeout
algorithm. If the W3C version fails, try the old way.
  • Loading branch information
AutomatedTester committed Mar 15, 2017
1 parent 758f676 commit af52bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,10 @@ def set_page_load_timeout(self, time_to_wait):
: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'})
Expand Down

0 comments on commit af52bf2

Please sign in to comment.