Skip to main content

Add interrupt rule

Add (or replace by name) a rule for this run: when a window or element appears, or a condition becomes true, click, press keys, close the window or run a child agent.

Command in the Interrupt handlers toolkit · id ooa.interrupts/add_rule · 9 inputs (2 required), no outputs

Inputs​

InputTypeRequiredDefaultWhat it is
NameStringYesRule name; adding a rule with the same name replaces it.
When windowStringNoWindow title pattern: text the title contains, a wildcard pattern with * and ?, or re: followed by a regular expression.
When elementStringNoElement selector that marks the pop-up, looked for in the browser session below.
Browser sessionStringNobrowserBrowser session for element rules.
ThenStringYesResponse: click the target, press the target keys, close the matched window, run the target agent, or only log it.
TargetStringNoFor click: a selector in the browser session or x,y screen coordinates; for press_keys: keys such as ENTER or ALT+F4; for run_agent: the agent id.
InputsDictionaryNoInputs for the child agent (run_agent).
Maximum timesNumberNo0Respond at most this many times in the run; 0 means no limit.
When conditionAnyNoAny condition, as for If (a toolkit's condition such as Image found), that marks the interruption; variables in it are read when the rule is added (Watch for interruptions reads them each time).