Skip to content

Commit f991af3

Browse files
authored
Merge pull request #95 from douglasdcm/small_fixes_in_timeouts
Round timeouts to ceil
2 parents 02420db + 95a3b76 commit f991af3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

caqui/easy/capabilities.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import math
2+
3+
14
class ProxyConfigurationBuilder:
25
"""
36
Reference: https://www.w3.org/TR/webdriver/#dfn-proxy-configuration
@@ -115,20 +118,26 @@ def __init__(self) -> None:
115118
self.__timeouts = {}
116119

117120
def implicit(self, timeout: int):
121+
"""Notice: if the number is a float, converts it to an integer"""
122+
timeout = math.ceil(timeout)
118123
self.__timeouts = {
119124
**self.__timeouts,
120125
"implicit": timeout,
121126
}
122127
return self
123128

124129
def page_load(self, timeout: int):
130+
"""Notice: if the number is a float, converts it to an integer"""
131+
timeout = math.ceil(timeout)
125132
self.__timeouts = {
126133
**self.__timeouts,
127134
"pageLoad": timeout,
128135
}
129136
return self
130137

131138
def script(self, timeout: int):
139+
"""Notice: if the number is a float, converts it to an integer"""
140+
timeout = math.ceil(timeout)
132141
self.__timeouts = {
133142
**self.__timeouts,
134143
"script": timeout,

0 commit comments

Comments
 (0)