Click, Type & Form Actions
Actions for clicking, typing, checking boxes, and picking options.
click
Click an element.
Value: string (selector)
<button id="submit-btn">Submit</button>
[
{ "click": "#submit-btn" }
]
Options
| Option | Type | Default | Description |
|---|---|---|---|
delay | number | 0 | Wait this many ms before clicking |
showClick | boolean | true | Show a red ring where it clicks |
waitFor | boolean | true | Wait for the element to appear first |
timeout | number | 10000 | How long to wait (ms) |
iframe | string | string[] | — | Find the element inside an iframe |
With delay and custom timeout:
[
{
"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
Move the mouse over an element without clicking. Useful for opening dropdown menus or tooltips.
Value: string (selector)
<div class="dropdown">
<span class="trigger">Menu</span>
<ul class="items">...</ul>
</div>
[
{ "hover": ".trigger" }
]
Options
Same as click: delay, showClick, waitFor, timeout, iframe.
fill
Type text into an input or textarea, one character at a time. Clears the field first by default.
Value: [selector, text]
<input type="email" name="email" />
[
{ "fill": ["input[name=email]", "user@example.com"] }
]
Options
| Option | Type | Default | Description |
|---|---|---|---|
clear | boolean | true | Clear the field before typing |
delay | number | 0 | Wait between each keystroke (ms) |
waitFor | boolean | true | Wait for the element to appear |
timeout | number | 10000 | How long to wait |
showClick | boolean | true | Show visual feedback |
iframe | string | string[] | — | Find the element inside an iframe |
Append to existing text:
[
{
"fill": ["textarea#message", " (edited)"],
"options": { "clear": false }
}
]
Slow typing (simulates human speed):
[
{
"fill": ["input#search", "Hello"],
"options": { "delay": 50 }
}
]
press
Press a key on an element. Use null as the selector to send the key to the whole page.
Value: [selector, key]
<input type="text" id="search" />
[
{ "press": ["#search", "Enter"] }
]
Send a key to the whole page:
[
{ "press": [null, "Escape"] }
]
Modifier keys — use + to combine:
[
{ "press": [null, "Control+a"] },
{ "press": [null, "Control+c"] },
{ "press": ["input", "Shift+Tab"] }
]
Options
Same as click: delay, waitFor, timeout, showClick, iframe.
check
Check a checkbox or radio button. Does nothing if it is already checked.
Value: string (selector)
<input type="checkbox" id="agree-terms" />
<label for="agree-terms">I agree to the terms</label>
[
{ "check": "#agree-terms" }
]
Options
| Option | Type | Default | Description |
|---|---|---|---|
checked | boolean | true | true to check, false to uncheck |
uncheck
Uncheck a checkbox. Shorthand for check with checked: false.
Value: string (selector)
<input type="checkbox" id="subscribe" checked />
[
{ "uncheck": "#subscribe" }
]
selectOption
Pick an option from a <select> dropdown. Matches by value attribute by default.
Value: [selector, value]
<select id="country">
<option value="US">United States</option>
<option value="UK">United Kingdom</option>
<option value="JP">Japan</option>
</select>
[
{ "selectOption": ["#country", "US"] }
]
By visible text:
[
{
"selectOption": ["#country", "United States"],
"options": { "by": "text" }
}
]
By index (0-based):
[
{
"selectOption": ["#country", 0],
"options": { "by": "index" }
}
]
Multi-select (pass an array of values):
[
{
"selectOption": ["select#tags", ["javascript", "python", "go"]],
"options": { "by": "text" }
}
]
Options
| Option | Type | Default | Description |
|---|---|---|---|
by | string | "value" | How to match: "value", "text", or "index" |