pub struct Step {
pub intent: String,
pub precondition: Option<Condition>,
pub action: Action,
pub fallback: Option<Action>,
pub expect: Condition,
pub timeout: Option<Duration>,
pub retry: RetryPolicy,
pub on_failure: OnFailure,
pub on_success: OnSuccess,
}Expand description
A single automation intent: execute an action, then wait for an expected UI state.
Fields§
§intent: StringHuman-readable label shown in logs, e.g. "click the Save button".
precondition: Option<Condition>Optional guard evaluated before the action. If false, the step is skipped (not an error). Useful for conditional steps such as “dismiss dialog if it appeared”.
action: ActionThe UI action to perform: click, type text, press a key, close a window, etc.
fallback: Option<Action>Optional fallback action run when expect times out on the primary action.
After the fallback runs, expect is re-polled once with a fresh timeout.
If it succeeds, the step succeeds; otherwise on_failure decides what happens.
expect: ConditionCondition that must become true after the action for the step to succeed. Polled every 100 ms until satisfied or the timeout elapses.
timeout: Option<Duration>Maximum time to wait for expect to become true. Overrides the workflow default.
Accepts duration strings such as "5s", "300ms", "2m".
retry: RetryPolicyRetry policy on timeout. Overrides the workflow default.
Default: none — falls back to the workflow-level default.
on_failure: OnFailureWhat to do when this step fails (expect condition times out, or fallback also fails).
Default: abort — propagate the error and stop the phase.
on_success: OnSuccessWhat to do immediately after this step succeeds.
Default: continue — proceed to the next step.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Step
impl<'de> Deserialize<'de> for Step
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 JsonSchema for Step
impl JsonSchema for Step
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