block¶
Group related actions together, optionally with conditional execution.
Usage Examples¶
Basic Grouping
actions:
- block:
description: "Evidence File Setup"
actions:
- command:
command: "mkdir /evidence"
- command:
command: "touch /evidence/test.txt"
- test: file_created
Conditional Execution
actions:
- block:
when:
- exists:
text: "Save"
description: "Save if button available"
actions:
- click:
target:
text: "Save"
- idle:
duration: 1.0
Nested Blocks
actions:
- block:
description: "File Deletion Test"
actions:
- block:
description: "Select File"
actions:
- click:
target:
text: "test.txt"
- block:
description: "Delete File"
actions:
- keyboard:
combination: ["delete"]
Delayed Execution
actions:
- block:
delay: 2.0
description: "Wait 2s then click OK"
actions:
- click:
target:
text: "OK"
Parameters¶
Parameter |
Type |
Description |
|---|---|---|
|
list |
Actions to execute in the block (required) |
|
list |
Conditions for block execution ( |
|
string |
Human-readable description (optional) |
|
float |
Optional delay (seconds) before executing block actions |
Notes¶
Blocks provide logical grouping and organization
Conditional execution checks GUI state before running actions
Nested blocks allow hierarchical action organization
Variables created in blocks persist to parent scope
See Also¶
loop for iterating over actions
wait_until for conditional waiting