Skip to content

Actions API Reference

Back to Configuration overview.

click

Click an element. Use to dismiss cookie banners, open menus, expand dropdowns.

PropertyTypeRequiredDescription
selectorstringyesCSS selector of the element to click
doubleClickbooleannoWhether to perform a double click
button"left" | "right" | "middle"noMouse button to click
modifiers("Alt" | "Control" | "ControlOrMeta" | "Meta" | "Shift")[]noModifier keys to hold during click
timeoutnumbernoTimeout in milliseconds
json
// minimal
{
  "type": "click",
  "selector": ".my-element"
}

// with options
{
  "type": "click",
  "selector": ".my-element",
  "doubleClick": true,
  "button": "right",
  "modifiers": [
    "Control"
  ],
  "timeout": 1
}

type

Type text into an input, textarea, or contenteditable element.

PropertyTypeRequiredDescription
selectorstringyesCSS selector of the input element
textstringyesText to type into the element
submitbooleannoWhether to press Enter after typing (submit form)
slowlybooleannoType one character at a time for key handlers
timeoutnumbernoTimeout in milliseconds
json
// minimal
{
  "type": "type",
  "selector": ".my-element",
  "text": "Hello world"
}

// with options
{
  "type": "type",
  "selector": ".my-element",
  "text": "Hello world",
  "submit": true,
  "slowly": true,
  "timeout": 1
}

hover

Hover over an element to trigger :hover states, show tooltips, or reveal menus.

PropertyTypeRequiredDescription
selectorstringyesCSS selector of the element to hover over
timeoutnumbernoTimeout in milliseconds
json
// minimal
{
  "type": "hover",
  "selector": ".my-element"
}

// with options
{
  "type": "hover",
  "selector": ".my-element",
  "timeout": 1
}

select_option

Select one or more options in a native <select> dropdown.

PropertyTypeRequiredDescription
selectorstringyesCSS selector of the <select> element
valuesstring[]yesOption values to select. Supports multiple.
timeoutnumbernoTimeout in milliseconds
json
// minimal
{
  "type": "select_option",
  "selector": ".my-element",
  "values": [
    "option-1",
    "option-2"
  ]
}

// with options
{
  "type": "select_option",
  "selector": ".my-element",
  "values": [
    "option-1",
    "option-2"
  ],
  "timeout": 1
}

press_key

Press a keyboard key or combination. Use to close modals, submit forms, etc.

PropertyTypeRequiredDescription
keystringyesKey to press, e.g. "Enter", "Escape", "Control+a"
json
{
  "type": "press_key",
  "key": "Enter"
}

drag

Drag an element and drop it onto another.

PropertyTypeRequiredDescription
fromstringyesCSS selector of the element to drag
tostringyesCSS selector of the drop target
timeoutnumbernoTimeout in milliseconds
json
// minimal
{
  "type": "drag",
  "from": ".draggable-item",
  "to": ".drop-zone"
}

// with options
{
  "type": "drag",
  "from": ".draggable-item",
  "to": ".drop-zone",
  "timeout": 1
}

wait

Pause execution until a condition is met.

PropertyTypeRequiredDescription
timenumbernoTime to wait in seconds (max 30s)
textstringnoWait for this text to appear on the page
textGonestringnoWait for this text to disappear from the page
json
// minimal
{
  "type": "wait"
}

// with options
{
  "type": "wait",
  "time": 0.5,
  "text": "Hello world",
  "textGone": "Loading..."
}

Navigate to a different URL or go back in history.

PropertyTypeRequiredDescription
urlstringnoURL to navigate to (absolute or relative)
backbooleannoNavigate back to the previous page
json
// minimal
{
  "type": "navigate"
}

// with options
{
  "type": "navigate",
  "url": "/dashboard",
  "back": true
}

evaluate

Run arbitrary JavaScript in the browser context. Escape hatch for DOM manipulation.

PropertyTypeRequiredDescription
functionstringyesJavaScript function: () => { ... } or (el) =>
selectorstringnoCSS selector of element to pass to function
json
// minimal
{
  "type": "evaluate",
  "function": "() => { document.querySelector(\".ad\").remove() }"
}

// with options
{
  "type": "evaluate",
  "function": "() => { document.querySelector(\".ad\").remove() }",
  "selector": ".my-element"
}

fill_form

Fill multiple form fields in one action.

PropertyTypeRequiredDescription
fieldsobject[]yesArray of fields to fill
fields[].selectorstringyesCSS selector of the form field
fields[].valuestringyesValue to fill. Checkboxes: "true"/"false"
fields[].fieldType"textbox" | "checkbox" | "radio" | "combobox" | "slider"yesType of the form field
timeoutnumbernoTimeout in milliseconds per field
json
// minimal
{
  "type": "fill_form",
  "fields": [
    {
      "selector": "#email",
      "value": "demo@example.com",
      "fieldType": "textbox"
    }
  ]
}

// with options
{
  "type": "fill_form",
  "fields": [
    {
      "selector": "#email",
      "value": "demo@example.com",
      "fieldType": "textbox"
    }
  ],
  "timeout": 1
}

handle_dialog

Set up handler for browser dialog. Place BEFORE action that triggers dialog.

PropertyTypeRequiredDescription
acceptbooleanyesWhether to accept the dialog
promptTextstringnoText to enter in case of a prompt dialog
json
// minimal
{
  "type": "handle_dialog",
  "accept": true
}

// with options
{
  "type": "handle_dialog",
  "accept": true,
  "promptText": "my answer"
}

file_upload

Upload one or more files through a file input element.

PropertyTypeRequiredDescription
selectorstringyesCSS selector of the file input element
pathsstring[]yesFile paths to upload (absolute or relative to config)
json
{
  "type": "file_upload",
  "selector": ".my-element",
  "paths": ["./screenshot.png"]
}

resize

Resize the browser viewport mid-flow.

PropertyTypeRequiredDescription
widthnumberyesViewport width in pixels
heightnumberyesViewport height in pixels
json
{
  "type": "resize",
  "width": 375,
  "height": 667
}

hide

Hide elements from screenshot. Use to remove cookie banners, chat widgets, ads.

PropertyTypeRequiredDescription
selectorsstring[]yesCSS selectors of elements to hide (display: none)
json
{
  "type": "hide",
  "selectors": []
}