Skip to content

Actions & Replay

brow actions

View the action log — every navigate, click, fill, key, select, upload, and fetch recorded in this session.

brow actions -s <id> [--json] [--clear]
FlagDescription
--jsonOutput as JSON array instead of human-readable format
--clearReset the action log
Terminal window
brow actions -s 1
# 1 navigate https://example.com [200]
# 2 fill #email value='user@example.com'
# 3 fill #password value='...'
# 4 click button[type=submit]
# 5 navigate https://example.com/dashboard [200]
brow actions -s 1 --json
# [
# {"seq": 1, "action": "navigate", "url": "https://example.com", "status": 200},
# {"seq": 2, "action": "fill", "selector": "#email", "value": "user@example.com"},
# ...
# ]

The action log is the input for the Playbook Writer workflow. After an exploratory session, review the log to identify the minimal set of steps needed, then write a playbook YAML from them.

brow replay

Execute a playbook YAML file against the current session.

brow replay -s <id> <playbook.yaml> [--var <key>=<value>]
Argument/FlagDescription
<playbook.yaml>Path to the playbook file
--varOverride a playbook variable (repeatable)
Terminal window
brow replay -s 1 search.yaml
brow replay -s 1 search.yaml --var query="playwright"
brow replay -s 1 search.yaml --var query="brow" --var count=20

Output per step:

✓ navigate https://example.com 200
✓ fill #search
✓ key Enter
✓ navigate https://example.com/results 200
→ {"results": [{"title": "brow", "url": "..."}...
✗ click .nonexistent Timeout waiting for selector

Playbook format

name: search-example
description: Search example.com for a term
base_url: https://example.com
auth: none # none | browser-session | browser
vars:
query: "default value" # overridable with --var
steps:
- action: navigate
url: /search
- action: fill
selector: "input[name=q]"
value: "{query}"
- action: key
key: Enter
- action: wait
ms: 1000
- action: fetch
url: /api/results?q={query}
method: GET
output: results # store parsed JSON in results entry

Supported step actions

ActionRequired fieldsOptional fields
navigateurltimeout
clickselector
fillselector, value
keykey
selectselector, value
fetchurlmethod, auth, output
waitms

Variable substitution

Use {varname} anywhere in string fields. Variables come from the vars section and can be overridden with --var:

vars:
user_id: "123"
date: "2024-01-01"
steps:
- action: fetch
url: /api/users/{user_id}/history?from={date}
Terminal window
brow replay -s 1 playbook.yaml --var user_id=456 --var date=2024-06-01