Returns whether the element exists in the HTML.
(self, selector, by="css selector")
| 1450 | self.open(url) |
| 1451 | |
| 1452 | def is_element_present(self, selector, by="css selector"): |
| 1453 | """Returns whether the element exists in the HTML.""" |
| 1454 | if self.__is_cdp_swap_needed(): |
| 1455 | return self.cdp.is_element_present(selector) |
| 1456 | self.wait_for_ready_state_complete() |
| 1457 | selector, by = self.__recalculate_selector(selector, by) |
| 1458 | if self.__is_shadow_selector(selector): |
| 1459 | return self.__is_shadow_element_present(selector) |
| 1460 | return page_actions.is_element_present(self.driver, selector, by) |
| 1461 | |
| 1462 | def is_element_visible(self, selector, by="css selector"): |
| 1463 | """Returns whether the element is visible on the page.""" |
no test coverage detected