Skip to main content

Composite Actions

bap act is the killer feature of BAP CLI. It batches multiple browser steps into a single command and a single server call.

Syntax

bap act <step1> <step2> <step3> ...
Each step follows the format:
action:selector=value    (for actions that need a value)
action:selector          (for actions without a value)

Examples

bap act fill:label:"Email"="user@example.com" \
        fill:label:"Password"="secret" \
        click:role:button:"Sign in"

Supported Actions

The following actions can be used in composite steps:
ActionSyntaxDescription
clickclick:selectorClick an element
fillfill:selector=valueFill an input field
typetype:textType text into focused element
presspress:keyPress a keyboard key
selectselect:selector=valueSelect a dropdown option
checkcheck:selectorCheck a checkbox
uncheckuncheck:selectorUncheck a checkbox
hoverhover:selectorHover over an element
gotogoto:urlNavigate to a URL

Fused Observation

Combine act with --observe to get the resulting page state in the same server call:
bap act click:role:button:"Submit" --observe
bap act click:e3 --observe --tier=interactive
This turns 3 roundtrips (act + observe + process) into 1.
--observe
flag
Perform a post-observation after all steps complete. Returns updated page elements.
--tier
string
default:"full"
Response tier for the fused observation: full, interactive, or minimal.

Selector Syntax in Steps

Within composite steps, the parser splits on the first : for the action name, then scans right-to-left for an unquoted = to separate the selector from the value.
fill:role:textbox:"Email"="user@example.com"
|    |                    |
|    selector             value
action
If your value contains =, wrap it in quotes: fill:e5="a=b". The parser finds the rightmost unquoted = to split.

Comparison

ApproachCommandsServer callsLLM reasoning cycles
Individual commands333
bap act111
bap act --observe111 (with page state)