MCPcopy
hub / github.com/plotly/dash / find_element

Method find_element

dash/testing/browser.py:245–254  ·  view source on GitHub ↗

find_element returns the first found element by the attribute `selector` shortcut to `driver.find_element(By.CSS_SELECTOR, ...)`. args: - attribute: the attribute type to search for, aligns with the Selenium API's `By` class. default "CSS_SELECTOR" val

(self, selector, attribute="CSS_SELECTOR")

Source from the content-addressed store, hash-verified

243 self.driver.save_screenshot(f"{target}/{name}_{self.session_id}.png")
244
245 def find_element(self, selector, attribute="CSS_SELECTOR"):
246 """find_element returns the first found element by the attribute `selector`
247 shortcut to `driver.find_element(By.CSS_SELECTOR, ...)`.
248 args:
249 - attribute: the attribute type to search for, aligns with the Selenium
250 API's `By` class. default "CSS_SELECTOR"
251 valid values: "CSS_SELECTOR", "ID", "NAME", "TAG_NAME",
252 "CLASS_NAME", "LINK_TEXT", "PARTIAL_LINK_TEXT", "XPATH"
253 """
254 return self.driver.find_element(getattr(By, attribute.upper()), selector)
255
256 def find_elements(self, selector, attribute="CSS_SELECTOR"):
257 """find_elements returns a list of all elements matching the attribute

Callers 15

_get_elementMethod · 0.95
wait_for_pageMethod · 0.95
select_date_singleMethod · 0.80
select_date_rangeMethod · 0.80
test_cnfd001_dialogFunction · 0.80

Calls

no outgoing calls