pub struct PageAssertions { /* private fields */ }Expand description
Assertions over a Page, produced by expect_page.
Implementations§
Source§impl PageAssertions
impl PageAssertions
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Builder: override the assertion timeout.
Sourcepub fn set_timeout(&mut self, timeout: Duration) -> &mut Self
pub fn set_timeout(&mut self, timeout: Duration) -> &mut Self
Override the assertion timeout in place.
Sourcepub async fn to_have_title(&self, expected: &str) -> Result<()>
pub async fn to_have_title(&self, expected: &str) -> Result<()>
Assert the page title equals expected.
Sourcepub async fn to_have_url(&self, expected: &str) -> Result<()>
pub async fn to_have_url(&self, expected: &str) -> Result<()>
Assert the page URL equals expected.
Sourcepub async fn to_have_title_regex(&self, pattern: &str) -> Result<()>
pub async fn to_have_title_regex(&self, pattern: &str) -> Result<()>
Assert the page title matches the regex pattern.
Sourcepub async fn to_have_url_regex(&self, pattern: &str) -> Result<()>
pub async fn to_have_url_regex(&self, pattern: &str) -> Result<()>
Assert the page URL matches the regex pattern.
Sourcepub async fn to_match_aria_snapshot(&self, expected: &str) -> Result<()>
pub async fn to_match_aria_snapshot(&self, expected: &str) -> Result<()>
Assert the page’s aria snapshot equals expected.
Simplified variant: compares the trimmed snapshot string against the
trimmed expected for exact equality — not Playwright’s structured
accessibility-tree diff.
Trait Implementations§
Source§impl Clone for PageAssertions
impl Clone for PageAssertions
Source§fn clone(&self) -> PageAssertions
fn clone(&self) -> PageAssertions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PageAssertions
impl !UnwindSafe for PageAssertions
impl Freeze for PageAssertions
impl Send for PageAssertions
impl Sync for PageAssertions
impl Unpin for PageAssertions
impl UnsafeUnpin for PageAssertions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more