#[non_exhaustive]pub enum Scroll {
Auto,
None,
}Expand description
Whether an action may scroll the element into view first.
Playwright’s actionability checks scroll the target into the viewport
before acting. None opts out, so the action fails instead of scrolling
when the element is out of view. Useful for asserting that something is
already visible, and for pages where scrolling itself changes layout.
See: https://playwright.dev/docs/api/class-locator#locator-click-option-scroll
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto
Scroll the element into view if needed (Playwright’s default).
None
Never scroll; act only if the element is already in view.
Trait Implementations§
impl Copy for Scroll
impl Eq for Scroll
impl StructuralPartialEq for Scroll
Auto Trait Implementations§
impl Freeze for Scroll
impl RefUnwindSafe for Scroll
impl Send for Scroll
impl Sync for Scroll
impl Unpin for Scroll
impl UnsafeUnpin for Scroll
impl UnwindSafe for Scroll
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