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

Function assert_text

seleniumbase/fixtures/page_actions.py:1985–1998  ·  view source on GitHub ↗
(
    driver,
    text,
    selector="html",
    by="css selector",
    timeout=settings.SMALL_TIMEOUT,
)

Source from the content-addressed store, hash-verified

1983
1984
1985def assert_text(
1986 driver,
1987 text,
1988 selector="html",
1989 by="css selector",
1990 timeout=settings.SMALL_TIMEOUT,
1991):
1992 selector, by = page_utils.recalculate_selector(selector, by)
1993 if __is_cdp_swap_needed(driver):
1994 driver.cdp.assert_text(text, selector)
1995 return True
1996 wait_for_text_visible(
1997 driver, text.strip(), selector, by=by, timeout=timeout
1998 )
1999
2000
2001def assert_exact_text(

Callers

nothing calls this directly

Calls 3

wait_for_text_visibleFunction · 0.85
__is_cdp_swap_neededFunction · 0.70
assert_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…