pub enum ActionType {
Show 36 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,
WaitForDom {
selector: Option<String>,
timeout: u32,
},
WaitForAndClick(String),
Screenshot,
Script,
KeyPress,
Hover,
DragDrop,
Submit,
Back,
Forward,
Refresh,
Extract,
ValidateChain,
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.
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).
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 · 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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ActionType
impl Display for ActionType
Source§impl PartialEq for ActionType
impl PartialEq for ActionType
Source§impl Serialize for ActionType
impl Serialize for ActionType
impl StructuralPartialEq for ActionType
Auto Trait Implementations§
impl Freeze for ActionType
impl RefUnwindSafe for ActionType
impl Send for ActionType
impl Sync for ActionType
impl Unpin for ActionType
impl UnwindSafe for ActionType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.