Set a sticky implicit timeout for element location and command completion. This method sets a timeout that applies to all element location strategies for the duration of the session. It only needs to be called once per session. To set the timeout for asynchronous script exec
(self, time_to_wait: float)
| 900 | |
| 901 | # Timeouts |
| 902 | def implicitly_wait(self, time_to_wait: float) -> None: |
| 903 | """Set a sticky implicit timeout for element location and command completion. |
| 904 | |
| 905 | This method sets a timeout that applies to all element location strategies |
| 906 | for the duration of the session. It only needs to be called once per session. |
| 907 | To set the timeout for asynchronous script execution, see set_script_timeout. |
| 908 | |
| 909 | Args: |
| 910 | time_to_wait: Amount of time to wait (in seconds). |
| 911 | |
| 912 | Example: |
| 913 | `driver.implicitly_wait(30)` |
| 914 | """ |
| 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. |