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

Method select

seleniumbase/fixtures/base_case.py:10404–10415  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 12

set_text_contentMethod · 0.45
wait_for_elementMethod · 0.45
wait_for_elementFunction · 0.45
wait_for_selectorFunction · 0.45

Calls 2

__is_cdp_swap_neededMethod · 0.95

Tested by

no test coverage detected