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

type: "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.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector(s) for the input element.
valuerequiredstringText to type. Supports {{TOKEN}} placeholders.
indexoptionalnumberWhich visible match to target (0 = first). Default: 0.
maskFilloptionalbooleanForce key-by-key masked input mode. Auto-detected by default — only needed for unusual mask formats.
noMaskoptionalbooleanForce plain typing even if a mask is detected. Use when auto-detect misidentifies a field as masked.
pickSuggestionoptionalbooleanAfter typing, click the best-matching autocomplete suggestion. Aliases: selectSuggestion, autocomplete.
suggestionSelectoroptionalstringCustom CSS selector for the suggestion dropdown (used with pickSuggestion).
allow_emptyoptionalbooleanSuppress the warning when value resolves to an empty string. Default: false.
JSON
{ "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

type: "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.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the select element.
valuerequiredstringOption text or value to select. Supports {{TOKEN}}. Alias: label.
indexoptionalnumberWhich visible match to target. Default: 0.
forceoptionalbooleanBypass actionability checks. Default: false.
timeoutoptionalnumberTimeout in ms. Default: 8000.
JSON
{ "type": "select", "selector": "#state", "value": "{{STATE}}" }
{ "type": "select", "selector": "#category", "value": "Option A" }

select_random

type: "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.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector(s) for the dropdown(s).
optionsrequired"all" | string[]"all" picks from every available option. An array restricts to those values only.
priorityoptionalstring | string[]Try these values first. Falls back to random if none match. Alias: selector_priority.
indexoptionalnumberWhich visible match to target. Default: 0.
forceoptionalbooleanBypass actionability checks. Default: false.
timeoutoptionalnumberTimeout in ms. Default: 8000.
repick_on_retryoptionalbooleanPick a different option on step retry instead of repeating. Default: false (pinned).
JSON
{ "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

type: "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.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the dropdown / widget area.
valuerequiredstringThe option to select. Supports {{TOKEN}}.
indexoptionalnumberWhich visible match to target. Default: 0.
JSON
{ "type": "auto_select", "selector": "#category", "value": "{{CATEGORY}}" }
{ "type": "auto_select", "selector": ".custom-dropdown", "value": "Option B" }

checkbox / set_checkbox

type: "set_checkbox"
type: "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.

ParamTypeDescription
selector / selectorsrequiredstring | string[]CSS selector(s) for the checkbox(es). Accepts selector, selectors, sel, or select.
checkedoptionalboolean | stringDesired state. Default: true. Accepts booleans or strings like "true", "yes", "on", "1". Aliases: desired, check, value.
indexoptionalnumberWhich visible match to target. Default: 0.
timeoutoptionalnumberTimeout in ms. Default: 6000.
JSON
{ "type": "set_checkbox", "selector": "#agree-terms" }
{ "type": "set_checkbox", "selectors": ["#agree-terms", "#privacy-policy"] }
{ "type": "set_checkbox", "selector": "#opt-out", "checked": false }

places_address

type: "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.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the address input field.
valueoptionalstringAddress text to type. Uses row data ({{ADDRESS}} etc.) by default.
indexoptionalnumberWhich visible match to target. Default: 0.
timeoutoptionalnumberHow long to wait for the Places dropdown (ms). Default: 12000. Env override: GHOST_PLACES_TIMEOUT_MS.
minScoreoptionalnumberMinimum match score (0-100). Default: 25.
citySelectoroptionalstringSelector for a separate city field to verify after selection.
stateSelectoroptionalstringSelector for a separate state field to verify after selection.
zipSelectoroptionalstringSelector for a separate ZIP field to verify after selection.
suggestionContaineroptionalstringCustom CSS selector for the suggestion dropdown, for sites that use non-standard autocomplete widgets. Aliases: suggestionBox, dropdown, suggestions.
JSON
{ "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

type: "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.

ParamTypeDescription
valueoptionalstringDate to select, or "select_random_available_date" (default) to pick any enabled day cell.
inputSelectoroptionalstringCSS selector for the date input field (clicked to open the calendar). Only needed when the calendar is initially closed.
calendarSelectoroptionalstringCSS selector for the calendar container element (scopes the day cell search).
availableDaySelectorsoptionalstring | string[]CSS selector(s) for clickable, enabled day cells. Auto-detected if not provided. Example: button[role='gridcell']:not([disabled]).
nextMonthSelectoroptionalstringCSS selector for the "next month" button. Enables multi-month navigation to find available dates.
prevMonthSelectoroptionalstringCSS selector for the "previous month" button. Enables backward navigation.
maxMonthsAheadoptionalnumberMax months to navigate forward looking for available dates. Default: 3.
strictoptionalbooleanIf true (default), a failed date pick triggers step retry. Set to false to continue without a verified date.
postClickDelayoptionalnumberDelay after clicking a day cell (ms). Default: 150.
JSON
// 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

type: "set_slider"

Sets a range slider to a specific value. Works with native <input type="range"> and custom slider/handle widgets (role="slider").

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the slider element.
valuerequiredstring | numberTarget value. Can be a number, "min", "max", "random", or a percentage like "75%". Supports {{TOKEN}}. Aliases: amount, target.
minoptionalnumberOverride the element's min bound.
maxoptionalnumberOverride the element's max bound.
indexoptionalnumberWhich visible match to target. Default: 0.
JSON
{ "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

type: "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.

ParamTypeDescription
keyrequiredstringKey name: Enter, Tab, ArrowDown, Escape, Backspace, etc. Alias: keys.
selectoroptionalstring | string[]Focus this element before pressing.
repeatoptionalnumberNumber of times to press (1-100). Default: 1.
delayoptionalnumberDelay between key presses in ms.
indexoptionalnumberWhich visible match to target. Default: 0.
JSON
{ "type": "press", "key": "Enter" }
{ "type": "press", "key": "Tab", "repeat": 3 }
{ "type": "press", "selector": "#dropdown", "key": "ArrowDown", "repeat": 2 }

focus

type: "focus"

Moves keyboard focus to an element without clicking it. Verifies that document.activeElement matches after focusing.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the element to focus.
indexoptionalnumberWhich visible match to target. Default: 0.
timeoutoptionalnumberTimeout in ms. Default: 3000.
JSON
{ "type": "focus", "selector": "#email" }
{ "type": "focus", "selector": ".search-input", "timeout": 5000 }

clear

type: "clear"

Clears a field's content using trusted keyboard input (Ctrl+A, Delete). Verifies the field is empty afterward.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the field to clear.
indexoptionalnumberWhich visible match to target. Default: 0.
timeoutoptionalnumberTimeout in ms. Default: 4000.
JSON
{ "type": "clear", "selector": "#phone" }
{ "type": "clear", "selector": "#email", "timeout": 5000 }

upload_file

type: "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.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the file input element.
filesrequiredstring | string[]File path(s) on disk to upload. Alias: file.
indexoptionalnumberWhich match to target. Default: 0.
timeoutoptionalnumberTimeout in ms. Default: 8000.
JSON
{ "type": "upload_file", "selector": "input[type=file]", "files": ["C:/docs/license.pdf"] }
{ "type": "upload_file", "selector": "#photo-upload", "file": "C:/photos/headshot.jpg" }

read

type: "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.

ParamTypeDescription
selectorrequiredstring | string[]CSS selector for the element to read from.
asrequiredstringVariable name to store the value (letters, digits, underscores, dots, hyphens). Alias: var.
whatoptionalstringWhat to read: "text" (default — visible text), "value" (input value or checked state), "attribute" (needs attribute param).
attributeoptionalstringHTML attribute name to read when what is "attribute". Alias: attr.
indexoptionalnumberWhich visible match to target. Default: 0.
JSON
{ "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" }