Browser Action
act:
Instructions
Perform a browser interaction: click, fill, type, check, select, press key, scroll, hover, mousemove, drag, upload, resize, back, forward. Use @eN refs from navigate/snapshot as the target (e.g. '@e2'). CSS selectors also work. drag: requires target (source) and target2 (destination). upload: requires target (file input) and filePaths. resize: requires width and height (no target needed). holdDuration: for click, holds mouse down for N ms (long-press). Returns a fresh snapshot if the page navigated, or just the action result if it didn't.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID. | |
| action | Yes | Interaction to perform. | |
| target | No | @eN ref or CSS selector. Required for click, fill, type, check, select, hover. | |
| value | No | Text for fill/type, option value for select. | |
| key | No | Key name for press (e.g. 'Enter', 'Tab', 'Control+a'). | |
| scrollDirection | No | Scroll direction. Default: down. | |
| scrollAmount | No | Pixels to scroll. Default: 300. | |
| typeDelay | No | Delay in ms between keystrokes for action='type'. Enables human-like typing speed. | |
| x | No | X coordinate for mousemove action. | |
| y | No | Y coordinate for mousemove action. | |
| target2 | No | Drop destination for drag action. @eN ref or CSS selector. | |
| filePaths | No | File path(s) for upload action. Single string or array of strings. | |
| width | No | Viewport width for resize action. | |
| height | No | Viewport height for resize action. | |
| holdDuration | No | Hold duration in ms for click action (long-press). Uses mouse.down() + wait + mouse.up(). |