Explicit wait until the element is present, timeout if not set, equals to the fixture's `wait_timeout` shortcut to `WebDriverWait` with `EC.presence_of_element_located`.
(self, element_id, timeout=None)
| 323 | ) |
| 324 | |
| 325 | def wait_for_element_by_id(self, element_id, timeout=None): |
| 326 | """Explicit wait until the element is present, timeout if not set, |
| 327 | equals to the fixture's `wait_timeout` shortcut to `WebDriverWait` with |
| 328 | `EC.presence_of_element_located`.""" |
| 329 | return self._wait_for( |
| 330 | EC.presence_of_element_located( |
| 331 | (By.ID, element_id), |
| 332 | ), |
| 333 | timeout, |
| 334 | f"timeout {timeout or self._wait_timeout}s => waiting for element id {element_id}", |
| 335 | ) |
| 336 | |
| 337 | def wait_for_class_to_equal(self, selector, classname, timeout=None): |
| 338 | """Explicit wait until the element's class has expected `value` timeout |