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.
ClickHold
Click and hold on an element found by selector for a duration in ms.
Fields
ClickHoldPoint
Click and hold at a specific point for a duration in ms.
Fields
ClickDrag
Click-and-drag from one element to another (selector-based).
Fields
ClickDragPoint
Click-and-drag from one point to another.
Fields
Type
Wait(u64)
Waits for a fixed duration in milliseconds.
Waits for the next navigation event.
WaitForDom
Wait for dom updates to stop.
Fields
WaitFor(String)
Waits for an element to appear.
WaitForWithTimeout
Waits for an element to appear with a timeout.
Fields
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
InfiniteScroll(u32)
Scrolls the page until the end.
Screenshot
Perform a screenshot on the page - fullscreen and omit background for params.
Fields
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
impl Clone for WebAutomation
Source§fn clone(&self) -> WebAutomation
fn clone(&self) -> WebAutomation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more