Skip to main content

ActionsMouse

Struct ActionsMouse 

Source
pub struct ActionsMouse { /* private fields */ }
Expand description

Struct to create the mouse actions sequence

Implementations§

Source§

impl ActionsMouse

Source

pub fn new() -> ActionsMouse

Source

pub fn pause(&mut self, duration: u32) -> &mut Self

Source

pub fn press_mouse_button(&mut self, button: MouseButton) -> &mut Self

Source

pub fn release_mouse_button(&mut self, button: MouseButton) -> &mut Self

Source

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

Source

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

Source

pub fn cancel_action(&mut self) -> &mut Self

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ActionsMouse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ActionsMouse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,