#[non_exhaustive]pub enum PointerAction {
Pause {
duration: Duration,
},
Down {
button: u64,
},
Up {
button: u64,
},
MoveBy {
duration: Option<Duration>,
x: i64,
y: i64,
},
MoveTo {
duration: Option<Duration>,
x: i64,
y: i64,
},
MoveToElement {
element: Element,
duration: Option<Duration>,
x: i64,
y: i64,
},
Cancel,
}
Expand description
An action performed with a pointer device.
This can be a mouse, pen or touch device.
See 17.4.3 Pointer Actions of the WebDriver standard.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pause
Pause action. Useful for adding pauses between other key actions.
Down
Pointer button down.
Fields
The mouse button index.
The following constants are provided, but any mouse index can be used to represent the corresponding mouse button.
Up
Pointer button up.
Fields
The mouse button index.
The following constants are provided, but any mouse index can be used to represent the corresponding mouse button.
MoveBy
Move the pointer relative to the current position.
The x and y offsets are relative to the current pointer position.
Fields
MoveTo
Move the pointer to a new position.
The x and y offsets are relative to the top-left corner of the viewport.
Fields
MoveToElement
Move the pointer to a position relative to the specified element.
Fields
Cancel
Pointer cancel action. Used to cancel the current pointer action.
Trait Implementations§
Source§impl Clone for PointerAction
impl Clone for PointerAction
Source§fn clone(&self) -> PointerAction
fn clone(&self) -> PointerAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more