Login Flow with bap act
The most common form automation pattern is a login flow. Withbap act, you batch fill + click into a single command:
Step Syntax
Each step inbap act follows the pattern action:selector=value:
| Part | Format | Example |
|---|---|---|
| Action | fill, click, type, press, select, check, uncheck | fill |
| Selector | Any BAP selector format | label:"Email", role:button:"Submit", e5 |
| Value | Right of = (optional for click) | "user@example.com" |
Positional Refs
After runningbap observe, use the returned element refs directly:
TypeScript SDK
Multi-Step Forms
For forms that span multiple pages or sections, chainbap act calls:
Conditional Steps
In the TypeScript SDK, add conditions to steps that should only run when a prerequisite is met:Error Recovery
Steps support three error handling strategies:Fused Observe + Act
Eliminate extra roundtrips by fusing observation with action:Recipes
For repeatable form flows, usebap recipe: