⏱️Element.should()
A collection of expected conditions against an Element.
Last updated
A collection of expected conditions against an Element.
Last updated
# Use the default wait_time
Element.should().<expectation>
---or---
# Customize the wait_time for this expectation
Element.should(timeout: int).<expectation>
---or---
# Ignore exceptions that you expect to "get in the way"
Element.should(ignored_exceptions: list).<expectation>
---or---
# Customize both fully
Element.should(timeout: int, ignored_exceptions: list).<expectation>def test_element_visible(py):
py.visit("https://qap.dev")
assert py.get("a[href='/about']").should().be_visible()def test_element_has_correct_text(py):
py.visit("https://qap.dev")
assert py.get("a[href='/about']").should().have_text("About")