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

Method find_visible_elements

seleniumbase/core/sb_cdp.py:464–474  ·  view source on GitHub ↗
(self, selector, timeout=None)

Source from the content-addressed store, hash-verified

462 return self.select_all(selector, timeout=timeout)
463
464 def find_visible_elements(self, selector, timeout=None):
465 if not timeout:
466 timeout = settings.MINI_TIMEOUT
467 visible_elements = []
468 elements = self.select_all(selector, timeout=timeout)
469 for element in elements:
470 with suppress(Exception):
471 position = element.get_position()
472 if (position.width != 0 or position.height != 0):
473 visible_elements.append(element)
474 return visible_elements
475
476 def click_nth_element(self, selector, number, scroll=True):
477 elements = self.select_all(selector)

Callers 3

raw_cdp_zillow.pyFile · 0.45
test_todo_listMethod · 0.45

Calls 1

select_allMethod · 0.95

Tested by 1

test_todo_listMethod · 0.36