MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / timeouts

Method timeouts

py/selenium/webdriver/remote/webdriver.py:952–970  ·  view source on GitHub ↗

Get all the timeouts that have been set on the current session. Returns: A named tuple with the following fields: - implicit_wait: The time to wait for elements to be found. - page_load: The time to wait for a page to load. - script: The

(self)

Source from the content-addressed store, hash-verified

950
951 @property
952 def timeouts(self) -> Timeouts:
953 """Get all the timeouts that have been set on the current session.
954
955 Returns:
956 A named tuple with the following fields:
957 - implicit_wait: The time to wait for elements to be found.
958 - page_load: The time to wait for a page to load.
959 - script: The time to wait for scripts to execute.
960
961 Example:
962 `driver.timeouts`
963 """
964 from selenium.webdriver.common.timeouts import Timeouts
965
966 timeouts = self.execute(Command.GET_TIMEOUTS)["value"]
967 timeouts["implicit_wait"] = timeouts.pop("implicit") / 1000
968 timeouts["page_load"] = timeouts.pop("pageLoad") / 1000
969 timeouts["script"] = timeouts.pop("script") / 1000
970 return Timeouts(**timeouts)
971
972 @timeouts.setter
973 def timeouts(self, timeouts) -> None:

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
TimeoutsClass · 0.90
_to_jsonMethod · 0.80

Tested by

no test coverage detected