Skip to main content

validate

Function validate 

Source
pub fn validate(step: &ComputerAct, tool: &str) -> Result<(), String>
Expand description

Semantic-step validation: an element target (selector + exactly one app scope) and the action’s payload.

tool names the calling pipeline in the error messages, so a future consumer reports its own name instead of a hardcoded one.

§Errors

Returns Err for a missing/blank selector, name and pid together, no app scope at all, a 0-based nth, or a missing payload — set_value/type_text/perform_action need value, set_numeric_value needs numeric_value, select_text needs a well-formed range (exactly two numbers, start <= end).