pub enum Action {
Show 20 variants
History {
delta: i32,
},
SelectOption {
target: LocatorSpec,
value: String,
},
NavigateWithHeaders {
url: String,
headers: HashMap<String, String>,
},
Drag {
target: LocatorSpec,
dx: f64,
dy: f64,
},
InsertText {
text: String,
},
SelectText {
target: LocatorSpec,
text: String,
},
Click {
target: LocatorSpec,
human: bool,
double: bool,
},
Fill {
target: LocatorSpec,
value: String,
human: bool,
},
Type {
target: LocatorSpec,
text: String,
human: bool,
},
Select {
target: LocatorSpec,
values: Vec<String>,
},
Upload {
target: LocatorSpec,
files: Vec<String>,
},
PressKey {
key: String,
},
Submit {
target: LocatorSpec,
},
Hover {
target: LocatorSpec,
human: bool,
},
Focus {
target: LocatorSpec,
},
ScrollIntoView {
target: LocatorSpec,
},
Navigate {
url: String,
referrer: Option<String>,
},
Reload,
Back,
Forward,
}Expand description
Native input or document action to perform once.
Variants§
History
Navigate by a relative history offset; zero reloads the current document.
SelectOption
Select one option by value, falling back to an exact visible label.
Fields
target: LocatorSpecSelect control resolved at execution time.
Navigate with temporary headers, restoring empty headers even on cancellation.
Drag
Drag an actionable target by a viewport offset.
Fields
target: LocatorSpecTarget at which to begin the drag.
InsertText
Insert text into the currently focused control.
SelectText
Select an option by its exact visible label.
Click
Click an actionable target once.
Fields
target: LocatorSpecLocator resolved at execution time.
Fill
Replace a form value and verify it.
Fields
target: LocatorSpecLocator resolved at execution time.
Type
Insert text into a target and verify an explicit condition.
Fields
target: LocatorSpecLocator resolved at execution time.
Select
Select options and verify their values.
Fields
target: LocatorSpecLocator resolved at execution time.
Upload
Set file inputs and verify file names and sizes.
Fields
target: LocatorSpecLocator resolved at execution time.
PressKey
Send a key combination and verify an explicit condition.
Submit
Focus a target and press Enter.
Fields
target: LocatorSpecLocator resolved at execution time.
Hover
Move the pointer to a target and verify hover.
Focus
Focus a target and verify focus.
Fields
target: LocatorSpecLocator resolved at execution time.
ScrollIntoView
Scroll a target into the viewport.
Fields
target: LocatorSpecLocator resolved at execution time.
Navigate and verify a document commit.
Reload
Reload and verify a document commit.
Back
Navigate to the previous history entry.
Forward
Navigate to the next history entry.
Implementations§
Source§impl Action
impl Action
Sourcepub fn target(&self) -> Option<&LocatorSpec>
pub fn target(&self) -> Option<&LocatorSpec>
Return the action target, if any.
Sourcepub fn requires_expectation(&self) -> bool
pub fn requires_expectation(&self) -> bool
Whether this action requires caller-supplied completion evidence.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Action, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Action, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Action
impl JsonSchema for Action
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more