Skip to content

Commit

Permalink
Merge pull request #95 from douglasdcm/small_fixes_in_timeouts
Browse files Browse the repository at this point in the history
Round timeouts to ceil
  • Loading branch information
douglasdcm authored Jul 8, 2024
2 parents 02420db + 95a3b76 commit f991af3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions caqui/easy/capabilities.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import math


class ProxyConfigurationBuilder:
"""
Reference: https://www.w3.org/TR/webdriver/#dfn-proxy-configuration
Expand Down Expand Up @@ -115,20 +118,26 @@ def __init__(self) -> None:
self.__timeouts = {}

def implicit(self, timeout: int):
"""Notice: if the number is a float, converts it to an integer"""
timeout = math.ceil(timeout)
self.__timeouts = {
**self.__timeouts,
"implicit": timeout,
}
return self

def page_load(self, timeout: int):
"""Notice: if the number is a float, converts it to an integer"""
timeout = math.ceil(timeout)
self.__timeouts = {
**self.__timeouts,
"pageLoad": timeout,
}
return self

def script(self, timeout: int):
"""Notice: if the number is a float, converts it to an integer"""
timeout = math.ceil(timeout)
self.__timeouts = {
**self.__timeouts,
"script": timeout,
Expand Down

0 comments on commit f991af3

Please sign in to comment.