What happened?
WebDriverWait uses time.time(), which displays system clock time and is non-monotonic:
|
end_time = time.time() + self._timeout |
It should instead use time.monotonic(), which is "not affected by system clock updates"
https://docs.python.org/3.7/library/time.html#time.monotonic
https://www.webucator.com/article/python-clocks-explained/
https://en.wikipedia.org/wiki/Monotonic_function
How can we reproduce the issue?
call time.time() around changes to system clock
Relevant log output
Operating System
n/a
Selenium version
master
What are the browser(s) and version(s) where you see this issue?
n/a
What are the browser driver(s) and version(s) where you see this issue?
n/a
Are you using Selenium Grid?
No response
What happened?
WebDriverWait uses
time.time(), which displays system clock time and is non-monotonic:selenium/py/selenium/webdriver/support/wait.py
Line 75 in 2a43011
It should instead use
time.monotonic(), which is "not affected by system clock updates"https://docs.python.org/3.7/library/time.html#time.monotonic
https://www.webucator.com/article/python-clocks-explained/
https://en.wikipedia.org/wiki/Monotonic_function
How can we reproduce the issue?
call
time.time()around changes to system clockRelevant log output
Operating System
n/a
Selenium version
master
What are the browser(s) and version(s) where you see this issue?
n/a
What are the browser driver(s) and version(s) where you see this issue?
n/a
Are you using Selenium Grid?
No response