We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c73a3c commit 96e5d9aCopy full SHA for 96e5d9a
py/selenium/webdriver/common/timeouts.py
@@ -18,7 +18,7 @@
18
19
class Timeouts(object):
20
21
- def __init__(self, implicit_wait=None, page_load=None, script=None):
+ def __init__(self, implicit_wait=0, page_load=0, script=0):
22
"""
23
Create a new Timeout object.
24
@@ -77,11 +77,10 @@ def script(self, _script):
77
self._script = self._convert(_script)
78
79
def _convert(self, timeout):
80
- if timeout:
81
- if isinstance(timeout, (int, float)):
82
- return int(float(timeout) * 1000)
83
- else:
84
- raise TypeError("Timeouts can only be an int or a float")
+ if isinstance(timeout, (int, float)):
+ return int(float(timeout) * 1000)
+ else:
+ raise TypeError("Timeouts can only be an int or a float")
85
86
def _to_json(self):
87
timeouts = {}
0 commit comments