Recording a Workflow
Start recording
~/.bap/recording.json so it survives across CLI invocations.YAML Format
A recorded workflow produces YAML like this:Parameters
Add parameterized values so workflows can be reused with different inputs:Assertions
Add post-step assertions to validate workflow correctness:| Assertion | What it checks |
|---|---|
url | URL contains the given string |
text | Text is visible on the page |
element | Element matching the BAP selector exists |
Step Labels
Add human-readable labels for clearer output:Repeat and Conditionals
Repeat a step N times
Repeat until a condition is met
Conditional execution
Macros
Define reusable step sequences:Error Handling
Control what happens when a step fails:Per-Step Timeout
Fused Observation
Addobserve: true to any step to get a page observation after it executes:
Managing Workflows
~/.bap/workflows/ as YAML files.
Step Types
| Type | What it does | Example args |
|---|---|---|
goto | Navigate to URL | https://example.com |
act | Composite action | click:text:"Submit" |
click | Click element | role:button:"OK" |
fill | Fill input | label:"Email"="user@test.com" |
observe | Observe page | (empty) |
extract | Extract data | --fields="title,price" |
screenshot | Take screenshot | (empty) |
scroll | Scroll page | 300 |
wait | Wait for condition | text:"Loaded" |
macro | Invoke a macro | (uses macro field) |