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

Method set_script_timeout

py/selenium/webdriver/remote/webdriver.py:917–929  ·  view source on GitHub ↗

Set the timeout for asynchronous script execution. This timeout specifies how long a script can run during an execute_async_script call before throwing an error. Args: time_to_wait: The amount of time to wait (in seconds). Example: `driver.s

(self, time_to_wait: float)

Source from the content-addressed store, hash-verified

915 self.execute(Command.SET_TIMEOUTS, {"implicit": int(float(time_to_wait) * 1000)})
916
917 def set_script_timeout(self, time_to_wait: float) -> None:
918 """Set the timeout for asynchronous script execution.
919
920 This timeout specifies how long a script can run during an
921 execute_async_script call before throwing an error.
922
923 Args:
924 time_to_wait: The amount of time to wait (in seconds).
925
926 Example:
927 `driver.set_script_timeout(30)`
928 """
929 self.execute(Command.SET_TIMEOUTS, {"script": int(float(time_to_wait) * 1000)})
930
931 def set_page_load_timeout(self, time_to_wait: float) -> None:
932 """Set the timeout for page load completion.

Calls 1

executeMethod · 0.95