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

Method wait_for_element_by_id

dash/testing/browser.py:325–335  ·  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, element_id, timeout=None)

Source from the content-addressed store, hash-verified

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,
327 equals to the fixture's `wait_timeout` shortcut to `WebDriverWait` with
328 `EC.presence_of_element_located`."""
329 return self._wait_for(
330 EC.presence_of_element_located(
331 (By.ID, element_id),
332 ),
333 timeout,
334 f"timeout {timeout or self._wait_timeout}s => waiting for element id {element_id}",
335 )
336
337 def wait_for_class_to_equal(self, selector, classname, timeout=None):
338 """Explicit wait until the element's class has expected `value` timeout

Callers 3

visit_and_snapshotMethod · 0.95
test_link001_eventFunction · 0.80

Calls 1

_wait_forMethod · 0.95

Tested by 2

test_link001_eventFunction · 0.64