Skip to content

Commit

Permalink
round timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasdcm committed Jul 8, 2024
1 parent 02420db commit 95a3b76
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 95a3b76

Please sign in to comment.