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

actions

list

Actions to execute in the block (required)

when

list

Conditions for block execution (exists/not_exists)

description

string

Human-readable description (optional)

delay

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