Returns the element once it appears in the HTML. Raises an exception if the element doesn't come in time. The element does not need be visible (it may be hidden). If CDP Mode has been activated: Calls self.cdp.select(). Otherwise: Same as self.wait_for_element_present
(self, selector, by="css selector", timeout=None)
| 10402 | ) |
| 10403 | |
| 10404 | def select(self, selector, by="css selector", timeout=None): |
| 10405 | """Returns the element once it appears in the HTML. |
| 10406 | Raises an exception if the element doesn't come in time. |
| 10407 | The element does not need be visible (it may be hidden). |
| 10408 | If CDP Mode has been activated: Calls self.cdp.select(). |
| 10409 | Otherwise: Same as self.wait_for_element_present().""" |
| 10410 | if self.__is_cdp_swap_needed(): |
| 10411 | return self.cdp.select(selector, timeout=timeout) |
| 10412 | else: |
| 10413 | return self.wait_for_element_present( |
| 10414 | selector, by=by, timeout=timeout |
| 10415 | ) |
| 10416 | |
| 10417 | def get_element(self, selector, by="css selector", timeout=None): |
| 10418 | """Same as wait_for_element_present() - returns the element. |
no test coverage detected