pub struct PageExpectation { /* private fields */ }Expand description
Page-level expectation for screenshot assertions.
Implementations§
Source§impl PageExpectation
impl PageExpectation
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sets a custom timeout for this assertion.
Sourcepub async fn to_have_screenshot(
self,
baseline_path: impl AsRef<Path>,
options: Option<ScreenshotAssertionOptions>,
) -> Result<()>
pub async fn to_have_screenshot( self, baseline_path: impl AsRef<Path>, options: Option<ScreenshotAssertionOptions>, ) -> Result<()>
Asserts that the page screenshot matches a baseline image.
See: https://playwright.dev/docs/test-assertions#page-assertions-to-have-screenshot-1
Auto Trait Implementations§
impl !Freeze for PageExpectation
impl !RefUnwindSafe for PageExpectation
impl Send for PageExpectation
impl Sync for PageExpectation
impl Unpin for PageExpectation
impl UnsafeUnpin for PageExpectation
impl !UnwindSafe for PageExpectation
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