Documentation Index
Fetch the complete documentation index at: https://docs.therefrain.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Each step has an action object with a required type field. The available fields depend on the action type.
Common action fields
| Field | Type | Required | Description |
|---|
type | ActionType | Yes | One of the 12 action types below |
selector | Selector | Depends | Target element (required for click, input, select, hover) |
value | string | Depends | Text value — supports {{variable}} template syntax |
Action types
click
Click on a DOM element.
action:
type: click
selector:
tagName: button
innerText: "Submit"
| Field | Required | Description |
|---|
selector | Yes | Element to click |
Enter text into a form field. The field is cleared before typing.
action:
type: input
value: "{{email}}"
selector:
tagName: input
inputType: email
| Field | Required | Description |
|---|
selector | Yes | Input element |
value | Yes | Text to enter (supports {{variable}} templates) |
select
Choose an option from a <select> dropdown.
action:
type: select
value: "us-west-2"
optionText: "US West (Oregon)"
selector:
tagName: select
name: "region"
| Field | Required | Description |
|---|
selector | Yes | Select element |
value | No | Option value attribute |
optionText | No | Visible option text (used when value is not set) |
navigate
Navigate the browser to a URL.
action:
type: navigate
url: "https://app.example.com/dashboard"
| Field | Required | Description |
|---|
url | Yes | Destination URL |
Scroll the page. No additional fields required — the executor scrolls the viewport.
wait
Wait for a specified condition or duration. Useful for pages that load asynchronously.
hover
Hover over an element to trigger menus or tooltips.
action:
type: hover
selector:
tagName: div
ariaLabel: "User menu"
| Field | Required | Description |
|---|
selector | Yes | Element to hover |
Run a JavaScript expression in the page context and capture the result.
action:
type: extract
script: "document.querySelector('.total').textContent"
captures:
- name: totalAmount
strategy: expression
expression: "{{__extracted}}"
| Field | Required | Description |
|---|
script | Yes | JavaScript to evaluate in the page |
The extracted value is available as {{__extracted}} for use in captures.
download
Download a file triggered by a click or navigation.
action:
type: download
downloadPath: "./downloads/report.csv"
selector:
tagName: a
innerText: "Download CSV"
| Field | Required | Description |
|---|
selector | No | Element that triggers the download |
downloadPath | No | Local path to save the file |
export
Export a memory collection to a CSV or JSON file.
action:
type: export
exportCollection: "products"
exportFormat: csv
exportPath: "./output/products.csv"
| Field | Required | Description |
|---|
exportCollection | Yes | Name of the memory collection |
exportFormat | Yes | csv or json |
exportPath | Yes | Output file path |
memory
Perform a memory operation (append or aggregate). This action type is a shorthand — you can also use memoryOperations on any step.
See Memory Operations for details.
key
Press a keyboard key or key combination.
action:
type: key
keys: "Enter"
| Field | Required | Description |
|---|
keys | Yes | Key name in Playwright format (e.g., Enter, Tab, ArrowDown, Control+a) |
Summary table
| Action | Selector | Value | Extra fields |
|---|
click | Required | — | — |
input | Required | Required | — |
select | Required | Optional | optionText |
navigate | — | — | url |
scroll | — | — | — |
wait | — | — | — |
hover | Required | — | — |
extract | — | — | script |
download | Optional | — | downloadPath |
export | — | — | exportCollection, exportFormat, exportPath |
memory | — | — | — |
key | — | — | keys |