WebAutomation

Enum WebAutomation 

Source
pub enum WebAutomation {
Show 22 variants Evaluate(String), Click(String), ClickAll(String), ClickAllClickable(), ClickPoint { x: f64, y: f64, }, ClickHold { selector: String, hold_for_ms: u64, }, ClickHoldPoint { x: f64, y: f64, hold_for_ms: u64, }, ClickDrag { from: String, to: String, modifier: Option<i64>, }, ClickDragPoint { from_x: f64, from_y: f64, to_x: f64, to_y: f64, modifier: Option<i64>, }, Type { value: String, modifier: Option<i64>, }, Wait(u64), WaitForNavigation, WaitForDom { selector: Option<String>, timeout: u32, }, WaitFor(String), WaitForWithTimeout { selector: String, timeout: u64, }, WaitForAndClick(String), ScrollX(i32), ScrollY(i32), Fill { selector: String, value: String, }, InfiniteScroll(u32), Screenshot { full_page: bool, omit_background: bool, output: String, }, ValidateChain,
}
Expand description

Represents various web automation actions.

Variants§

§

Evaluate(String)

Runs custom JavaScript code.

§

Click(String)

Clicks on an element.

§

ClickAll(String)

Clicks on all elements.

§

ClickAllClickable()

Clicks on all elements.

§

ClickPoint

Clicks at the position x and y coordinates.

Fields

§x: f64

The horizontal (X) coordinate.

§y: f64

The vertical (Y) coordinate.

§

ClickHold

Click and hold on an element found by selector for a duration in ms.

Fields

§selector: String

The CSS selector to target.

§hold_for_ms: u64

Duration to hold in milliseconds.

§

ClickHoldPoint

Click and hold at a specific point for a duration in ms.

Fields

§x: f64

The horizontal (X) coordinate.

§y: f64

The vertical (Y) coordinate.

§hold_for_ms: u64

Duration to hold in milliseconds.

§

ClickDrag

Click-and-drag from one element to another (selector-based).

Fields

§from: String

CSS selector for the start element.

§to: String

CSS selector for the destination element.

§modifier: Option<i64>

Optional key modifier (Rust: Option).

§

ClickDragPoint

Click-and-drag from one point to another.

Fields

§from_x: f64

Start X coordinate.

§from_y: f64

Start Y coordinate.

§to_x: f64

End X coordinate.

§to_y: f64

End Y coordinate.

§modifier: Option<i64>

Optional key modifier (Rust: Option).

§

Type

Fields

§value: String

The value to type.

§modifier: Option<i64>

The click modifier.

§

Wait(u64)

Waits for a fixed duration in milliseconds.

§

WaitForNavigation

Waits for the next navigation event.

§

WaitForDom

Wait for dom updates to stop.

Fields

§selector: Option<String>

The selector of the element to wait for updates.

§timeout: u32

The timeout to wait for in ms.

§

WaitFor(String)

Waits for an element to appear.

§

WaitForWithTimeout

Waits for an element to appear with a timeout.

Fields

§selector: String

The selector of the element to wait for updates.

§timeout: u64

The timeout to wait for in ms.

§

WaitForAndClick(String)

Waits for an element to appear and then clicks on it.

§

ScrollX(i32)

Scrolls the screen in the horizontal axis by a specified amount in pixels.

§

ScrollY(i32)

Scrolls the screen in the vertical axis by a specified amount in pixels.

§

Fill

Fills an input element with a specified value.

Fields

§selector: String

The selector of the input element to fill.

§value: String

The value to fill the input element with.

§

InfiniteScroll(u32)

Scrolls the page until the end.

§

Screenshot

Perform a screenshot on the page - fullscreen and omit background for params.

Fields

§full_page: bool

Take a full page screenshot.

§omit_background: bool

Omit the background.

§output: String

The output file to store the screenshot.

§

ValidateChain

Only continue to the next automation if the prior step was valid. Use this intermediate after a step to break out of the chain.

Trait Implementations§

Source§

impl Clone for WebAutomation

Source§

fn clone(&self) -> WebAutomation

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WebAutomation

Source§

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

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

impl<'de> Deserialize<'de> for WebAutomation

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 PartialEq for WebAutomation

Source§

fn eq(&self, other: &WebAutomation) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for WebAutomation

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
Source§

impl StructuralPartialEq for WebAutomation

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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