Skip to main content

act

Function act 

Source
pub async fn act(input: &ComputerAct) -> Result<ActOutput, String>
Expand description

Run a semantic pipeline on an accessibility-tree element: actions, keyboard steps and waits chained via then, executed sequentially in ONE call with && semantics.

§Errors

Returns Err (before any side effect) for an invalid step anywhere in the chain: a semantic step without a target, keyboard/wait fields on a semantic step (or vice versa), key with text, text with held, an unknown key/modifier name, a missing value/numeric_value/range payload, a wait that is 0 or over the cap, or a chain deeper than ACT_CHAIN_MAX_DEPTH. Returns Err mid-chain (earlier steps stay applied — they were real actions) when the app or a visible+enabled selector match does not appear within the timeout, or the platform rejects the action.