MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / is_element_present

Method is_element_present

seleniumbase/fixtures/base_case.py:1452–1460  ·  view source on GitHub ↗

Returns whether the element exists in the HTML.

(self, selector, by="css selector")

Source from the content-addressed store, hash-verified

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."""

Callers 10

get_gui_element_rectMethod · 0.95
set_content_to_frameMethod · 0.95
js_click_if_presentMethod · 0.95
choose_fileMethod · 0.95
save_screenshotMethod · 0.45
__ad_block_as_neededMethod · 0.45
is_element_presentFunction · 0.45

Tested by

no test coverage detected