Skip to main content

Click, Type & Form Actions

Actions for interacting with page elements — clicking, typing, checking boxes, and selecting options.

click

Click an element. Dispatches a full mouse event sequence: mousemovemousedownfocusmouseupclick.

Value: string (selector)

{ "click": "#submit-btn" }

Options

OptionTypeDefaultDescription
delaynumber0Delay in ms before clicking
showClickbooleantrueShow red pulsing ring animation
waitForbooleantrueWait for element if not immediately found
timeoutnumber10000Max wait time in ms
iframestring | string[]Target element inside iframe(s)
{
"click": "button.submit",
"options": { "delay": 500, "timeout": 5000 }
}

Using XPath

{ "click": "//button[contains(text(), 'Sign In')]" }

Inside an Iframe

{
"click": ".inner-button",
"options": { "iframe": "#content-frame" }
}

Nested Iframes

{
"click": ".deep-button",
"options": { "iframe": ["#outer-frame", "#inner-frame"] }
}

hover

Hover over an element. Dispatches mouseentermouseovermousemove.

Value: string (selector)

{ "hover": ".dropdown-trigger" }

Options

Same options as click (delay, showClick, waitFor, timeout, iframe).

fill

Type text into an input field character by character with keyboard events.

Value: [selector, text]

{ "fill": ["input[name=email]", "user@example.com"] }

Options

OptionTypeDefaultDescription
clearbooleantrueClear existing text before typing
delaynumber0Delay in ms between keystrokes
waitForbooleantrueWait for element
timeoutnumber10000Max wait time
showClickbooleantrueShow visual feedback
iframestring | string[]Target inside iframe
{
"fill": ["textarea#message", "Hello World!"],
"options": { "delay": 50, "clear": false }
}

press

Press a key or key combination.

Value: [selector, key] or [null, key] (for page-level key press)

{ "press": ["input#search", "Enter"] }
{ "press": [null, "Escape"] }

Modifier Keys

Use + to combine modifiers:

{ "press": [null, "Control+a"] }
{ "press": ["input", "Shift+Tab"] }
{ "press": [null, "Control+c"] }

Options

Same as click (delay, waitFor, timeout, showClick, iframe).

check

Check a checkbox or radio button. Only clicks if not already in the desired state.

Value: string (selector)

{ "check": "#agree-terms" }

Options

OptionTypeDefaultDescription
checkedbooleantrueDesired state — true to check, false to uncheck
{
"check": "#newsletter",
"options": { "checked": false }
}

uncheck

Uncheck a checkbox. Shorthand for check with checked: false.

Value: string (selector)

{ "uncheck": "#subscribe" }

selectOption

Select an option from a <select> dropdown.

Value: [selector, value] or [selector, [values]] for multi-select

{ "selectOption": ["select#country", "US"] }

Select by Text

{
"selectOption": ["select#country", "United States"],
"options": { "by": "text" }
}

Select by Index

{
"selectOption": ["select#country", 0],
"options": { "by": "index" }
}

Multi-Select

{
"selectOption": ["select#tags", ["javascript", "python", "go"]],
"options": { "by": "text" }
}

Options

OptionTypeDefaultDescription
bystring"value"Selection method: "value", "text", or "index"

Example: Complete Form Fill

{
"actions": [
{ "openNewTab": "https://example.com/register" },
{ "fill": ["input[name=firstName]", "John"] },
{ "fill": ["input[name=lastName]", "Doe"] },
{ "fill": ["input[name=email]", "john@example.com"] },
{ "fill": ["input[name=password]", "SecurePass123!"] },
{ "selectOption": ["select[name=country]", "United States"], "options": { "by": "text" } },
{ "check": "#agree-terms" },
{ "click": "button[type=submit]" },
{ "waitForElement": ".success-message" },
{ "screenshot": "viewport" }
]
}