pub struct ActionsMouse { /* private fields */ }Expand description
Struct to create the mouse actions sequence
Implementations§
Source§impl ActionsMouse
impl ActionsMouse
pub fn new() -> ActionsMouse
pub fn pause(&mut self, duration: u32) -> &mut Self
Sourcepub fn move_mouse_to_point(&mut self, x: i32, y: i32) -> &mut Self
pub fn move_mouse_to_point(&mut self, x: i32, y: i32) -> &mut Self
The point’s coordinates are relative to the viewport, if x or y is larger than the coordinate of the viewport, you will get an error calling the perform_actions method of the Browser
Sourcepub fn move_mouse_to_element(&mut self, element: &Element) -> &mut Self
pub fn move_mouse_to_element(&mut self, element: &Element) -> &mut Self
Moves mouse to the center of the element. Will cause an error if the element is not in the viewport
pub fn cancel_action(&mut self) -> &mut Self
Sourcepub fn drag_n_drop(
&mut self,
elem_to_drag: Element,
elem_destination: Element,
) -> &mut Self
pub fn drag_n_drop( &mut self, elem_to_drag: Element, elem_destination: Element, ) -> &mut Self
Drag one element and drop it on another one.
Trait Implementations§
Source§impl Debug for ActionsMouse
impl Debug for ActionsMouse
Source§impl<'de> Deserialize<'de> for ActionsMouse
impl<'de> Deserialize<'de> for ActionsMouse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ActionsMouse
impl RefUnwindSafe for ActionsMouse
impl Send for ActionsMouse
impl Sync for ActionsMouse
impl Unpin for ActionsMouse
impl UnsafeUnpin for ActionsMouse
impl UnwindSafe for ActionsMouse
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