Dock act
dock_actRun up to 12 browser actions in one call per tab and return per-step results plus a page outline. Pass the snapshot doc to reject clicks if the page changed first.
Instructions
Act in a tab with trusted input — up to 12 steps in ONE call. Returns per-step results and (observe=true, the default) the page outline afterwards, so you rarely need a separate dock_snapshot. Pass doc from the snapshot you read so a page that changed under you is refused instead of clicked blindly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | No | The doc id from the snapshot the refs came from. | |
| tab_id | Yes | Tab id from dock_tabs or dock_open. | |
| actions | Yes | Ordered steps, run one after another; the first failure stops the batch and later steps are skipped (results say which ran). Each step is {"action": verb, …}. TARGET = ref (a [ref_N] from dock_snapshot) OR a locator: role (+ name), testid, css, has_text or xpath (+ nth, 1-based) — a locator matching several elements fails as ambiguous, never guesses. Verbs: click {TARGET | x,y, button?, clicks?} · type {text, TARGET?, clear?, submit?} · fill {TARGET, value} (sets a field / checkbox / dropdown directly — fastest) · key {keys e.g. "Control+a"} · scroll {direction up|down, amount? | TARGET} · hover {TARGET | x,y} · select {TARGET, value} · navigate {url | back | forward | reload} · wait {ms ≤ 5000} · wait_for {locator | url_contains, gone?, timeout_ms ≤ 15000} (event driven) · extract {TARGET, attr?, max?} (text / links of matching elements) · get_text {} · upload {TARGET (a file input), files: [absolute paths on this computer]} (the user confirms on the page). click / type / key / navigate take dialog: accept|dismiss for an alert/confirm/prompt the step opens (default dismiss; prompt_text answers a prompt). Typing into a password or card field asks the user first. | |
| observe | No | true: the page outline after the steps (default); "diff": only what changed; false: nothing. | |
| deadline_ms | No | Milliseconds to wait for the action to complete |