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)
| 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: |