Recipes
Built-in recipe commands for common browser automation patterns. Recipes combine multiple BAP commands into single, parameterized operations.
login
Automate a login flow with one command.
bap recipe login https://app.example.com/login --user=admin@example.com --pass=secret123
Username or email to fill.
The recipe navigates to the URL, observes the page to find username/password fields, fills them, and clicks the submit button.
Fill a form using data from a JSON file.
bap recipe fill-form https://app.example.com/signup --data=form-data.json
The page URL containing the form.
Path to a JSON file mapping field labels or selectors to values.
Example form-data.json:
{
"Name": "Jane Doe",
"Email": "jane@example.com",
"Country": "Canada",
"I agree to the terms": true
}
wait-for
Wait for an element to appear on the page.
bap recipe wait-for role:button:"Continue"
bap recipe wait-for text:"Order confirmed" --timeout=30000
Selector for the element to wait for.
Maximum wait time in milliseconds.
Use wait-for after actions that trigger asynchronous page updates, like form submissions or API
calls that update the DOM.