Interaction
Click, fill, select, type, hover, and submit -- form control and element interaction tools
Interaction tools let your agent click buttons, fill forms, select dropdowns, type with realistic delays, upload files, and submit forms. All element targeting uses @ref IDs from the DOM snapshot. Some tools accept force: true to override hidden/disabled visibility checks when needed.
browse_click
Click an interactive element by its @ref ID from the snapshot. If the element is a link, follows it and returns the new page snapshot.
Looks up the element via __wraith_ref_index, calls focus(), click(), and dispatches a bubbling click Event. If the element has an href, reports the link URL. Falls back to basic click_element() on JS failure.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | The @e reference number from the snapshot (e.g., 5 means the element shown as @e5) |
force | boolean | no | false | Set to true to bypass hidden/disabled/obscured safety checks |
Request
{
"tool": "browse_click",
"arguments": {
"ref_id": 3
}
}Response
{
"content": [
{
"type": "text",
"text": "Clicked @e3 (button \"Submit\")\n\nPage: \"Thank You\" (https://example.com/thank-you)\n\n@e1 [link] \"Return Home\" href=/\n\n1 interactive element"
}
]
}browse_fill
Fill a form field with text, replacing any existing content. React-compatible -- uses the native value setter, _valueTracker invalidation, and direct onChange dispatch through the React fiber tree.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | The @e reference of the form field from the snapshot |
text | string | yes | -- | Text to fill into the field (replaces existing content) |
force | boolean | no | false | Set to true to bypass hidden/disabled/obscured safety checks |
Behavior
- Looks up element via
__wraith_get_by_ref(ref_id) - Calls
focus()on the element - Uses
Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').setto handle React-controlled inputs - Invalidates React's
_valueTracker(forces React to see the change) - Dispatches
focus,input,change,blurevents (bubbling) - Walks the React fiber tree looking for
__reactProps$or__reactFiber$to callonChangedirectly - Reads back the value to verify it persisted -- reports
verifiedorUNVERIFIED
Request
{
"tool": "browse_fill",
"arguments": {
"ref_id": 5,
"text": "Jane Smith"
}
}Response
{
"content": [
{
"type": "text",
"text": "@e5: FILLED (native_events, verified): Jane Smith"
}
]
}browse_type
Type text with realistic per-character keystroke delays. Use this instead of browse_fill when the site watches for individual keydown/keyup events (e.g., autocomplete inputs, search-as-you-type fields).
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | The @e reference of the input field |
text | string | yes | -- | Text to type character by character |
delay_ms | integer | no | 50 | Milliseconds between keystrokes. Higher values look more human-like |
force | boolean | no | false | Set to true to bypass hidden/disabled/obscured safety checks |
Behavior
Focuses the element, then for each character: appends to .value and dispatches an input event. After all characters: dispatches change and blur events.
Request
{
"tool": "browse_type",
"arguments": {
"ref_id": 8,
"text": "remote rust developer",
"delay_ms": 75
}
}Response
{
"content": [
{
"type": "text",
"text": "@e8: TYPED 21 chars with 75ms delay: remote rust developer"
}
]
}browse_select
Select an option in a native <select> dropdown by its value.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | The @e reference of the <select> element |
value | string | yes | -- | The option value to select |
force | boolean | no | false | Set to true to bypass hidden/disabled/obscured safety checks |
Behavior
Looks up the element, focuses it, sets .value, and dispatches change and input events.
Request
{
"tool": "browse_select",
"arguments": {
"ref_id": 12,
"value": "US"
}
}Response
{
"content": [
{
"type": "text",
"text": "@e12: SELECTED \"US\" (United States)"
}
]
}browse_hover
Hover over an element by its @ref ID. Triggers CSS :hover styles and JavaScript mouseover/mouseenter handlers. Useful for revealing hidden menus, tooltips, or dropdown panels.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | The @e reference of the element to hover over |
Request
{
"tool": "browse_hover",
"arguments": {
"ref_id": 7
}
}Response
{
"content": [
{
"type": "text",
"text": "Hovered @e7 (div \"Account Menu\")"
}
]
}browse_key_press
Press a keyboard key on the current page. Dispatches keydown, keypress, and keyup events.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | yes | -- | Key name: "Enter", "Tab", "Escape", "ArrowDown", "ArrowUp", "Backspace", "Space", "Delete", "Home", "End", etc. |
Request
{
"tool": "browse_key_press",
"arguments": {
"key": "Enter"
}
}Response
{
"content": [
{
"type": "text",
"text": "Pressed key: Enter"
}
]
}browse_scroll
Scroll the page viewport. See the Navigation reference for full details.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
direction | string | yes | -- | "up", "down", "left", or "right" |
amount | integer | no | 500 | Pixels to scroll |
browse_scroll_to
Scroll to center a specific element. See the Navigation reference for full details.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | Element @e reference to scroll into view |
browse_custom_dropdown
Interact with a non-native dropdown or combobox component (React, Greenhouse, MUI, etc.). Handles the open-type-click pattern that custom dropdowns use instead of native <select> elements.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | The @e reference of the combobox trigger element (usually an input or button) |
value | string | yes | -- | The option text to select. The tool types this value to filter the options list, then clicks the match |
Behavior
- Clicks the trigger element to open the dropdown panel
- Types the
valuestring to filter the options list - Finds the matching option element in the resulting listbox
- Clicks it and reports whether an exact match was found
Request
{
"tool": "browse_custom_dropdown",
"arguments": {
"ref_id": 14,
"value": "United States"
}
}Response
{
"content": [
{
"type": "text",
"text": "@e14: SELECTED custom dropdown option \"United States\" (exact match)"
}
]
}browse_dismiss_overlay
Dismiss a modal, overlay, popup, or cookie banner that is blocking interaction. Automatically finds the close/dismiss/accept button within the overlay and clicks it.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | no | -- | The @e reference of the overlay element to dismiss. If omitted, auto-detects the topmost overlay |
Request — auto-detect
{
"tool": "browse_dismiss_overlay",
"arguments": {}
}Response
{
"content": [
{
"type": "text",
"text": "Dismissed overlay: cookie consent banner (clicked \"Accept All\")\n\nPage: \"Careers\" (https://example.com/careers)\n\n@e1 [link] \"Software Engineer\" href=/careers/12345\n@e2 [link] \"Product Manager\" href=/careers/67890\n\n2 interactive elements"
}
]
}Request — specific overlay
{
"tool": "browse_dismiss_overlay",
"arguments": {
"ref_id": 22
}
}browse_upload_file
Upload a file from disk to an <input type="file"> element on the current page. Reads the file, base64-encodes it, and injects it via JavaScript using the DataTransfer API. Handles hidden file inputs commonly used by modern web applications.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
file_path | string | yes | -- | Absolute path to the file on disk (e.g., "/home/user/resume.pdf" or "C:/Users/Matt/Documents/resume.pdf") |
ref_id | integer | no | -- | The @e reference of the file input element. If omitted or 0, auto-detects the first input[type="file"] on the page |
Behavior
- Reads file from disk and base64-encodes it
- Looks up element by
ref_id, or scans allinput[type="file"]nodes (including hidden ones) - Creates
FileandDataTransferobjects in QuickJS - Sets
input.files = dt.files - Dispatches
changeandinputevents
Request
{
"tool": "browse_upload_file",
"arguments": {
"file_path": "/home/user/resume.pdf",
"ref_id": 48
}
}Response
{
"content": [
{
"type": "text",
"text": "OK: uploaded resume.pdf (11403 bytes) to @e48"
}
]
}browse_submit_form
Submit a form by clicking its submit button or calling form.submit(). ATS-aware -- detects supported applicant tracking systems and POSTs to the correct API endpoint with the right content type.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ref_id | integer | yes | -- | The @e reference of the submit button, form element, or any element inside the form |
Behavior
- If
ref_idpoints to a button: clicks it - If
ref_idpoints to a<form>: callsform.submit() - If
ref_idpoints to any element inside a form: submits the parent form - For ATS platforms: serializes all form fields, constructs the correct API endpoint and content type (multipart, form-urlencoded, or JSON), and POSTs with proper
Origin/Refererheaders
Request
{
"tool": "browse_submit_form",
"arguments": {
"ref_id": 25
}
}Response
{
"content": [
{
"type": "text",
"text": "Form submitted (7 fields) via POST to https://api.example.com/v1/applications\nContent-Type: multipart/form-data\nHTTP 200 OK\n\nPage: \"Application Received\" (https://example.com/thank-you)\n\n@e1 [link] \"Return to Careers\" href=/careers\n\n1 interactive element"
}
]
}browse_solve_captcha
Solve a CAPTCHA on the current page using a third-party solving service (2captcha). Supports reCAPTCHA v3 and Cloudflare Turnstile. Auto-detects the site key from the page if not provided. Requires the TWOCAPTCHA_API_KEY environment variable.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
captcha_type | string | no | "recaptchav3" | CAPTCHA type: "recaptchav3" or "turnstile" (Cloudflare) |
site_key | string | no | -- | CAPTCHA site key. If omitted, auto-detected from the page via data-sitekey attribute or reCAPTCHA script URL |
url | string | no | -- | Page URL where the CAPTCHA appears. If omitted, uses the current page URL |
Request
{
"tool": "browse_solve_captcha",
"arguments": {
"captcha_type": "turnstile"
}
}Response
{
"content": [
{
"type": "text",
"text": "CAPTCHA solved (turnstile). Token injected into page. Site key: 0x4AAAAAAABkMYinukE8nzYS (auto-detected). Solve time: 12.4s"
}
]
}Additional Interaction Tools
browse_fetch_scripts
Fetch and execute external <script src="..."> tags from the current page. Call this after browse_navigate when you need React/Vue/Angular to mount for form filling to work properly. Downloads JavaScript bundles and runs them in QuickJS so React's event system activates.
No parameters (accepts optional max_bytes to limit total download size, default 2MB).
browse_login
Full login flow with redirect chain following. Navigates to the login page, fills credentials, clicks submit, and follows the entire OAuth/auth redirect chain (302 -> 302 -> 200). Captures all Set-Cookie headers at every redirect hop.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | yes | -- | Login page URL |
username_ref_id | integer | yes | -- | @e reference of the username/email input |
password_ref_id | integer | yes | -- | @e reference of the password input |
username | string | yes | -- | Username or email to fill |
password | string | yes | -- | Password to fill |
submit_ref_id | integer | yes | -- | @e reference of the submit/login button |
browse_eval_js
Execute JavaScript code on the current page in the QuickJS context and return the result.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
code | string | yes | -- | JavaScript source code to execute. Returns the last expression's value as a string |