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

Method wait_for_element_by_css_selector

dash/testing/browser.py:300–310  ·  view source on GitHub ↗

Explicit wait until the element is present, timeout if not set, equals to the fixture's `wait_timeout` shortcut to `WebDriverWait` with `EC.presence_of_element_located`.

(self, selector, timeout=None)

Source from the content-addressed store, hash-verified

298 return self.wait_for_element_by_css_selector(selector, timeout)
299
300 def wait_for_element_by_css_selector(self, selector, timeout=None):
301 """Explicit wait until the element is present, timeout if not set,
302 equals to the fixture's `wait_timeout` shortcut to `WebDriverWait` with
303 `EC.presence_of_element_located`."""
304 return self._wait_for(
305 EC.presence_of_element_located(
306 (By.CSS_SELECTOR, selector),
307 ),
308 timeout,
309 f"timeout {timeout or self._wait_timeout}s => waiting for selector {selector}",
310 )
311
312 def wait_for_no_elements(self, selector, timeout=None):
313 """Explicit wait until an element is NOT found. timeout defaults to

Calls 1

_wait_forMethod · 0.95