MCPcopy Index your code
hub / github.com/plotly/dash / wait_for_no_elements

Method wait_for_no_elements

dash/testing/browser.py:312–323  ·  view source on GitHub ↗

Explicit wait until an element is NOT found. timeout defaults to the fixture's `wait_timeout`.

(self, selector, timeout=None)

Source from the content-addressed store, hash-verified

310 )
311
312 def wait_for_no_elements(self, selector, timeout=None):
313 """Explicit wait until an element is NOT found. timeout defaults to
314 the fixture's `wait_timeout`."""
315 until(
316 # if we use get_elements it waits a long time to see if they appear
317 # so this one calls out directly to execute_script
318 lambda: self.driver.execute_script(
319 f"return document.querySelectorAll('{selector}').length"
320 )
321 == 0,
322 timeout or self._wait_timeout,
323 )
324
325 def wait_for_element_by_id(self, element_id, timeout=None):
326 """Explicit wait until the element is present, timeout if not set,

Calls 1

untilFunction · 0.90