Form Actions
Actions for filling forms — text inputs, dropdowns, checkboxes, file uploads, address autocomplete, calendar pickers, sliders, and keyboard input. All input goes through trusted browser drivers (CDP keyboard and pointer) — never synthetic JS events.
type
Types text into an input field character by character with natural timing. Automatically detects masked inputs (phone, DOB, card numbers) and handles them key-by-key — no maskFill flag needed in most cases. Supports autocomplete suggestion picking after typing.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector(s) for the input element. |
| valuerequired | string | Text to type. Supports {{TOKEN}} placeholders. |
| indexoptional | number | Which visible match to target (0 = first). Default: 0. |
| maskFilloptional | boolean | Force key-by-key masked input mode. Auto-detected by default — only needed for unusual mask formats. |
| noMaskoptional | boolean | Force plain typing even if a mask is detected. Use when auto-detect misidentifies a field as masked. |
| pickSuggestionoptional | boolean | After typing, click the best-matching autocomplete suggestion. Aliases: selectSuggestion, autocomplete. |
| suggestionSelectoroptional | string | Custom CSS selector for the suggestion dropdown (used with pickSuggestion). |
| allow_emptyoptional | boolean | Suppress the warning when value resolves to an empty string. Default: false. |
{ "type": "type", "selector": "#email", "value": "{{EMAIL}}" }
{ "type": "type", "selector": "#phone", "value": "{{PHONE}}", "maskFill": true }
{ "type": "type", "selector": "#address", "value": "{{ADDRESS}}", "pickSuggestion": true }
{ "type": "type", "selector": "#search", "value": "product search" }select
Selects an option from a <select> dropdown. Matches by option text, label, or value attribute. Works with both native selects and custom div-based dropdowns.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the select element. |
| valuerequired | string | Option text or value to select. Supports {{TOKEN}}. Alias: label. |
| indexoptional | number | Which visible match to target. Default: 0. |
| forceoptional | boolean | Bypass actionability checks. Default: false. |
| timeoutoptional | number | Timeout in ms. Default: 8000. |
{ "type": "select", "selector": "#state", "value": "{{STATE}}" }
{ "type": "select", "selector": "#category", "value": "Option A" }select_random
Selects a random option from a dropdown. Useful for fields like "How did you hear about us?" where any answer works. The chosen option is pinned on retry — a step retry repeats the same selection.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector(s) for the dropdown(s). |
| optionsrequired | "all" | string[] | "all" picks from every available option. An array restricts to those values only. |
| priorityoptional | string | string[] | Try these values first. Falls back to random if none match. Alias: selector_priority. |
| indexoptional | number | Which visible match to target. Default: 0. |
| forceoptional | boolean | Bypass actionability checks. Default: false. |
| timeoutoptional | number | Timeout in ms. Default: 8000. |
| repick_on_retryoptional | boolean | Pick a different option on step retry instead of repeating. Default: false (pinned). |
{ "type": "select_random", "selector": "#source", "options": "all" }
{ "type": "select_random", "selector": "#category", "options": ["Option A", "Option B", "Option C"] }
{ "type": "select_random", "selector": "#preference", "options": ["Yes", "No"], "priority": ["No"] }auto_select
Intelligently selects the best-matching option from any dropdown type — native <select> elements, custom div-based dropdowns, listboxes, radio groups, comboboxes, and ARIA widgets. The driver detects the widget type automatically, handles opening, searching, fuzzy matching, and clicking internally. Use this when select doesn't work on a custom dropdown.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the dropdown / widget area. |
| valuerequired | string | The option to select. Supports {{TOKEN}}. |
| indexoptional | number | Which visible match to target. Default: 0. |
{ "type": "auto_select", "selector": "#category", "value": "{{CATEGORY}}" }
{ "type": "auto_select", "selector": ".custom-dropdown", "value": "Option B" }checkbox / set_checkbox
Sets a checkbox to the desired state. The driver verifies the final checked state via checked and aria-checked attributes — if the state doesn't match after clicking, it retries and falls back to setChecked.
| Param | Type | Description |
|---|---|---|
| selector / selectorsrequired | string | string[] | CSS selector(s) for the checkbox(es). Accepts selector, selectors, sel, or select. |
| checkedoptional | boolean | string | Desired state. Default: true. Accepts booleans or strings like "true", "yes", "on", "1". Aliases: desired, check, value. |
| indexoptional | number | Which visible match to target. Default: 0. |
| timeoutoptional | number | Timeout in ms. Default: 6000. |
{ "type": "set_checkbox", "selector": "#agree-terms" }
{ "type": "set_checkbox", "selectors": ["#agree-terms", "#privacy-policy"] }
{ "type": "set_checkbox", "selector": "#opt-out", "checked": false }places_address
Google Places address autocomplete — types an address into the field, waits for the Places dropdown to appear, then clicks the best-matching suggestion. Optionally verifies that city, state, and ZIP auto-filled correctly after selection.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the address input field. |
| valueoptional | string | Address text to type. Uses row data ({{ADDRESS}} etc.) by default. |
| indexoptional | number | Which visible match to target. Default: 0. |
| timeoutoptional | number | How long to wait for the Places dropdown (ms). Default: 12000. Env override: GHOST_PLACES_TIMEOUT_MS. |
| minScoreoptional | number | Minimum match score (0-100). Default: 25. |
| citySelectoroptional | string | Selector for a separate city field to verify after selection. |
| stateSelectoroptional | string | Selector for a separate state field to verify after selection. |
| zipSelectoroptional | string | Selector for a separate ZIP field to verify after selection. |
| suggestionContaineroptional | string | Custom CSS selector for the suggestion dropdown, for sites that use non-standard autocomplete widgets. Aliases: suggestionBox, dropdown, suggestions. |
{ "type": "places_address", "selector": "#address", "value": "{{ADDRESS}}, {{CITY}}, {{STATE}} {{ZIP}}" }
{ "type": "places_address", "selector": "#street", "value": "{{ADDRESS}}", "suggestionContainer": ".pac-item" }
{
"type": "places_address",
"selector": "#address",
"value": "{{ADDRESS}}",
"citySelector": "#city",
"stateSelector": "#state",
"zipSelector": "#zip"
}calendar_date_pick
Universal date/calendar picker — handles various calendar UI implementations (MUI, jQuery UI, native date inputs, custom widgets). Can select a specific date or pick a random available date. Supports multi-month navigation to find available dates in future months.
| Param | Type | Description |
|---|---|---|
| valueoptional | string | Date to select, or "select_random_available_date" (default) to pick any enabled day cell. |
| inputSelectoroptional | string | CSS selector for the date input field (clicked to open the calendar). Only needed when the calendar is initially closed. |
| calendarSelectoroptional | string | CSS selector for the calendar container element (scopes the day cell search). |
| availableDaySelectorsoptional | string | string[] | CSS selector(s) for clickable, enabled day cells. Auto-detected if not provided. Example: button[role='gridcell']:not([disabled]). |
| nextMonthSelectoroptional | string | CSS selector for the "next month" button. Enables multi-month navigation to find available dates. |
| prevMonthSelectoroptional | string | CSS selector for the "previous month" button. Enables backward navigation. |
| maxMonthsAheadoptional | number | Max months to navigate forward looking for available dates. Default: 3. |
| strictoptional | boolean | If true (default), a failed date pick triggers step retry. Set to false to continue without a verified date. |
| postClickDelayoptional | number | Delay after clicking a day cell (ms). Default: 150. |
// Pick any available date (most common usage)
{ "type": "calendar_date_pick", "inputSelector": "#dob" }
106
{ "type": "calendar_date_pick", "inputSelector": "#appointment", "value": "{{DOB}}" }
217
{
"type": "calendar_date_pick",
"inputSelector": "#date",
"calendarSelector": ".calendar-popup",
"availableDaySelectors": ["button.day:not([disabled])"],
"nextMonthSelector": ".next-month-btn",
"prevMonthSelector": ".prev-month-btn",
"maxMonthsAhead": 6
}set_slider
Sets a range slider to a specific value. Works with native <input type="range"> and custom slider/handle widgets (role="slider").
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the slider element. |
| valuerequired | string | number | Target value. Can be a number, "min", "max", "random", or a percentage like "75%". Supports {{TOKEN}}. Aliases: amount, target. |
| minoptional | number | Override the element's min bound. |
| maxoptional | number | Override the element's max bound. |
| indexoptional | number | Which visible match to target. Default: 0. |
{ "type": "set_slider", "selector": "#price-range", "value": "50000" }
{ "type": "set_slider", "selector": "#quantity", "value": "75%" }
{ "type": "set_slider", "selector": "#rating", "value": "random" }
{ "type": "set_slider", "selector": "#range", "value": "max" }press
Sends a trusted keyboard key press. Can optionally target a specific element first. Without a selector, presses the key on the currently focused element.
| Param | Type | Description |
|---|---|---|
| keyrequired | string | Key name: Enter, Tab, ArrowDown, Escape, Backspace, etc. Alias: keys. |
| selectoroptional | string | string[] | Focus this element before pressing. |
| repeatoptional | number | Number of times to press (1-100). Default: 1. |
| delayoptional | number | Delay between key presses in ms. |
| indexoptional | number | Which visible match to target. Default: 0. |
{ "type": "press", "key": "Enter" }
{ "type": "press", "key": "Tab", "repeat": 3 }
{ "type": "press", "selector": "#dropdown", "key": "ArrowDown", "repeat": 2 }focus
Moves keyboard focus to an element without clicking it. Verifies that document.activeElement matches after focusing.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the element to focus. |
| indexoptional | number | Which visible match to target. Default: 0. |
| timeoutoptional | number | Timeout in ms. Default: 3000. |
{ "type": "focus", "selector": "#email" }
{ "type": "focus", "selector": ".search-input", "timeout": 5000 }clear
Clears a field's content using trusted keyboard input (Ctrl+A, Delete). Verifies the field is empty afterward.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the field to clear. |
| indexoptional | number | Which visible match to target. Default: 0. |
| timeoutoptional | number | Timeout in ms. Default: 4000. |
{ "type": "clear", "selector": "#phone" }
{ "type": "clear", "selector": "#email", "timeout": 5000 }upload_file
Uploads one or more files to a file input. Works with hidden file inputs (commonly styled behind a button). Verifies that files are attached after upload.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the file input element. |
| filesrequired | string | string[] | File path(s) on disk to upload. Alias: file. |
| indexoptional | number | Which match to target. Default: 0. |
| timeoutoptional | number | Timeout in ms. Default: 8000. |
{ "type": "upload_file", "selector": "input[type=file]", "files": ["C:/docs/license.pdf"] }
{ "type": "upload_file", "selector": "#photo-upload", "file": "C:/photos/headshot.jpg" }read
Reads text, value, or an attribute from an element and stores it in a run variable. Use the variable later in other actions with {{variable_name}}. Read-only observation — never modifies the page.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector for the element to read from. |
| asrequired | string | Variable name to store the value (letters, digits, underscores, dots, hyphens). Alias: var. |
| whatoptional | string | What to read: "text" (default — visible text), "value" (input value or checked state), "attribute" (needs attribute param). |
| attributeoptional | string | HTML attribute name to read when what is "attribute". Alias: attr. |
| indexoptional | number | Which visible match to target. Default: 0. |
{ "type": "read", "selector": "#confirmation-id", "as": "CONF_ID", "what": "text" }
{ "type": "read", "selector": "#otp-input", "as": "OTP", "what": "value" }
{ "type": "read", "selector": "#link", "as": "REDIRECT_URL", "what": "attribute", "attribute": "href" }