Expand description
Playwright-style expect(locator) / expect(page) assertions.
Each assertion polls its underlying Locator / Page method every
~100ms until the condition holds, or the assertion timeout (default 5s)
elapses, in which case Error::Timeout is returned with a message naming
the assertion and the actual-vs-expected values.
Negation via LocatorAssertions::not / PageAssertions::not flips the
sense: a negated assertion succeeds when the base condition is false
within the timeout.
Structs§
- Locator
Assertions - Assertions over a
Locator, produced byexpect. - Page
Assertions - Assertions over a
Page, produced byexpect_page. - Screenshot
Assert Options - Options for
LocatorAssertions::to_have_screenshot.
Functions§
- expect
- Construct
LocatorAssertionsforlocator, mirroring Playwright’sexpect(locator). - expect_
page - Construct
PageAssertionsforpage. Mirrors Playwright’sexpect(page). (Distinct name fromexpectbecause Rust cannot overloadexpecton the parameter type without a trait.)