Module expect

Module expect 

Source
Expand description

Assertion API for browser automation tests.

The expect function creates assertion builders for locators and pages, enabling fluent async assertions.

§Example

use viewpoint_test::expect;

// Assert element is visible
expect(&locator).to_be_visible().await?;

// Assert text content
expect(&locator).to_have_text("Hello").await?;

// Assert page URL
expect(&page).to_have_url("https://example.com").await?;

Structs§

LocatorAssertions
Assertions for locators (elements).
PageAssertions
Assertions for pages.
SoftAssertionError
Collection of soft assertion errors.
SoftAssertions
A context for collecting soft assertions.
SoftLocatorAssertions
Soft assertions for locators.
SoftPageAssertions
Soft assertions for pages.

Traits§

Expectable
Trait for creating assertions from different types.

Functions§

expect
Create assertions for a locator.
expect_page
Create assertions for a page.