Act on the page
surfsky_actPerform human-like mouse and keyboard actions on the active tab: click, fill, type, press, select, scroll. Returns updated page state and snapshot to verify changes and continue browsing.
Instructions
Perform one input action on the active tab with human-like mouse and keyboard, then settle and return the page state (url, navigated, changed) plus a fresh snapshot with @N refs. Use it for every click, form entry and keypress. Per action: click, dblclick, hover take target; fill takes target and text and replaces the value; type takes target and text and appends keystrokes (target '@focused' types into the focused element without clicking); press takes key; select takes target and value; scroll takes target (scrolls it into view) or delta_y, and with neither scrolls most of a screen down. changed: false in the result means nothing observable happened: snapshot or wait instead of repeating the action. Actions hit the live site and submissions have real side effects: stop before a payment or final confirmation the user did not ask for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Key for press: a name such as Enter, Tab, Escape, Backspace, ArrowDown, or a combination like Control+A. | |
| text | No | Text for fill (replaces the field's value) or type (keystrokes appended to it). | |
| value | No | Option to choose for select: its value attribute, or its visible label with by_label. | |
| action | Yes | click, dblclick, hover (target); fill (target, text); type (target, text); press (key); select (target, value); scroll (target, or delta_y, or neither). | |
| target | No | A CSS selector, @N from the latest snapshot of this tab, or text=words (the first visible element whose name contains the words). XPath is not accepted. | |
| delta_y | No | Pixels to scroll the page for scroll without target: positive down, negative up. Default: most of a screen down. | |
| timeout | No | Seconds allowed for the action, including finding the element (default 10). | |
| by_label | No | Match value against the option's visible label instead of its value attribute. | |
| snapshot | No | Include a fresh snapshot of interactive elements in the result (default true). | |
| modifiers | No | Modifier keys held during click, dblclick or press. | |
| session_id | No | Session from surfsky_session_start. Omit for the shared default session, started on first use. |