pub enum ActionType {
Show 41 variants
Navigate,
Click,
ClickAll(String),
ClickPoint {
x: f64,
y: f64,
},
ClickHold {
selector: String,
hold_ms: u64,
},
ClickHoldPoint {
x: f64,
y: f64,
hold_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>,
},
ClickAllClickable,
Type,
Fill {
selector: String,
value: String,
},
Clear,
Select,
Check,
Scroll,
ScrollX(i32),
ScrollY(i32),
InfiniteScroll(u32),
Wait,
WaitFor(String),
WaitForWithTimeout {
selector: String,
timeout: u64,
},
WaitForNavigation,
WaitForLoad,
WaitForNetworkIdle,
WaitForNetworkAlmostIdle,
WaitForDom {
selector: Option<String>,
timeout: u32,
},
WaitForAndClick(String),
Screenshot,
Script,
KeyPress,
Hover,
DragDrop,
Submit,
Back,
Forward,
Refresh,
Extract,
ValidateChain,
RunPython {
code: String,
timeout_ms: Option<u64>,
},
RunJavaScript {
code: String,
timeout_ms: Option<u64>,
},
Custom(String),
}Expand description
Types of actions that can be performed.
Variants§
Navigate to a URL.
Click
Click an element.
ClickAll(String)
Click all elements matching a selector.
ClickPoint
Click at specific x,y coordinates.
ClickHold
Click and hold on an element.
Fields
ClickHoldPoint
Click and hold at a specific point.
Fields
ClickDrag
Click-and-drag from one element to another.
Fields
ClickDragPoint
Click-and-drag from one point to another.
Fields
ClickAllClickable
Click all clickable elements on the page.
Type
Type text into an element.
Fill
Fill an input element with a value (clears first).
Clear
Clear an input field.
Select
Select an option from a dropdown.
Check
Check/uncheck a checkbox.
Scroll
Scroll the page or element (generic).
ScrollX(i32)
Scroll horizontally by pixels.
ScrollY(i32)
Scroll vertically by pixels.
InfiniteScroll(u32)
Infinite scroll (auto-scroll to page end).
Wait
Wait for a fixed duration (ms).
WaitFor(String)
Wait for an element to appear.
WaitForWithTimeout
Wait for an element with timeout.
Wait for the next navigation event.
WaitForLoad
Wait for the page load event (readyState complete).
WaitForNetworkIdle
Wait for zero in-flight network connections (CDP networkIdle).
WaitForNetworkAlmostIdle
Wait for ≤2 in-flight network connections (CDP networkAlmostIdle).
WaitForDom
Wait for DOM updates to stop.
Fields
WaitForAndClick(String)
Wait for an element then click it.
Screenshot
Take a screenshot.
Script
Execute JavaScript (alias: Evaluate).
KeyPress
Press a key or key combination.
Hover
Hover over an element.
DragDrop
Drag and drop.
Submit
Submit a form.
Back
Go back in history.
Forward
Go forward in history.
Refresh
Refresh the page.
Extract
Extract data from the page.
ValidateChain
Only continue if prior step was valid (chain control).
RunPython
Run a Python script in the embedded pure-Rust interpreter (rustpython-vm).
Fields
RunJavaScript
Run a JavaScript script in the embedded pure-Rust interpreter (boa_engine).
Distinct from Script/Evaluate which runs JS in the page’s real browser context.
Fields
Custom(String)
Custom action.
Trait Implementations§
Source§impl Clone for ActionType
impl Clone for ActionType
Source§fn clone(&self) -> ActionType
fn clone(&self) -> ActionType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActionType
impl Debug for ActionType
Source§impl<'de> Deserialize<'de> for ActionType
impl<'de> Deserialize<'de> for ActionType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for ActionType
impl Display for ActionType
Source§impl PartialEq for ActionType
impl PartialEq for ActionType
Source§fn eq(&self, other: &ActionType) -> bool
fn eq(&self, other: &ActionType) -> bool
self and other values to be equal, and is used by ==.