pub struct PageAssertions<'a> { /* private fields */ }Expand description
Assertions for pages.
Implementations§
Source§impl<'a> PageAssertions<'a>
impl<'a> PageAssertions<'a>
Sourcepub fn negated(self) -> Self
pub fn negated(self) -> Self
Negate the assertion.
This is an alias for the not method to avoid conflict with std::ops::Not.
Sourcepub fn not(self) -> Self
pub fn not(self) -> Self
Negate the assertion.
Note: This method name shadows the Not trait’s method. Use negated() if
you need to avoid this conflict.
Sourcepub async fn to_have_url(&self, expected: &str) -> Result<(), AssertionError>
pub async fn to_have_url(&self, expected: &str) -> Result<(), AssertionError>
Assert that the page has the specified URL.
§Errors
Returns an error if the assertion fails or the URL cannot be retrieved.
Sourcepub async fn to_have_url_containing(
&self,
expected: &str,
) -> Result<(), AssertionError>
pub async fn to_have_url_containing( &self, expected: &str, ) -> Result<(), AssertionError>
Assert that the page URL contains the specified substring.
§Errors
Returns an error if the assertion fails or the URL cannot be retrieved.
Sourcepub async fn to_have_title(&self, expected: &str) -> Result<(), AssertionError>
pub async fn to_have_title(&self, expected: &str) -> Result<(), AssertionError>
Assert that the page has the specified title.
§Errors
Returns an error if the assertion fails or the title cannot be retrieved.
Sourcepub async fn to_have_title_containing(
&self,
expected: &str,
) -> Result<(), AssertionError>
pub async fn to_have_title_containing( &self, expected: &str, ) -> Result<(), AssertionError>
Assert that the page title contains the specified substring.
§Errors
Returns an error if the assertion fails or the title cannot be retrieved.
Auto Trait Implementations§
impl<'a> Freeze for PageAssertions<'a>
impl<'a> !RefUnwindSafe for PageAssertions<'a>
impl<'a> Send for PageAssertions<'a>
impl<'a> Sync for PageAssertions<'a>
impl<'a> Unpin for PageAssertions<'a>
impl<'a> !UnwindSafe for PageAssertions<'a>
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