Explicit wait until the element's text equals the expected `text`. timeout if not set, equals to the fixture's `wait_timeout` shortcut to `WebDriverWait` with customized `text_to_equal` condition.
(self, selector, text, timeout=None)
| 355 | ) |
| 356 | |
| 357 | def wait_for_text_to_equal(self, selector, text, timeout=None): |
| 358 | """Explicit wait until the element's text equals the expected `text`. |
| 359 | |
| 360 | timeout if not set, equals to the fixture's `wait_timeout` |
| 361 | shortcut to `WebDriverWait` with customized `text_to_equal` |
| 362 | condition. |
| 363 | """ |
| 364 | method = text_to_equal(selector, text, timeout or self.wait_timeout) |
| 365 | |
| 366 | return self._wait_for( |
| 367 | method=method, |
| 368 | timeout=timeout, |
| 369 | msg=method.message, |
| 370 | ) |
| 371 | |
| 372 | def wait_for_contains_class(self, selector, classname, timeout=None): |
| 373 | """Explicit wait until the element's classes contains the expected `classname`. |