fill_form
Fill form fields and optionally submit, with support for dynamic fields, login-failure detection, and audit logging.
Instructions
Fill form fields and optionally submit. Pass intent="..." (≤120 chars) to label this action in audit logs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | Yes | Tab ID to execute on | |
| fields | No | Field label/name/placeholder to value map. Checkboxes: "true"/"false" | |
| submit | No | Submit button query after fill | |
| clear_first | No | Clear before fill. Default: true | |
| waitForMs | No | Poll timeout for dynamic fields in ms. Default: 0 | |
| pollInterval | No | Poll interval in ms (50-2000). Default: 300 | |
| loginCheck | No | After submit, run a generic login-failure detector that flips success → failure when the password form is still mounted. Default: "auto". Set "off" to restore pre-#658 behavior. | |
| refs | No | Optional ref→value map (#831). Refs come from a recent read_page(mode="ax") snapshot. When present, refs are processed before `fields` and skip AX/CSS discovery. Stale refs produce a STALE_REF error — no silent coordinate fallback. | |
| verify | No | Verify mode. boolean is legacy: true→"screenshot", false→"none". String enum returns a compact diff signal (AX-hash delta + pHash, ≤4KB). | |
| intent | No | Human-readable label for this action in audit logs (≤120 chars) | |
| capture_artifact | No | When true, stage replay artifact steps for oc_skill_record after successfully filled fields. Default false is a strict no-op. | |
| returnAfterState | No | Optional chaining hint. When "ax" or "dom", the response includes a page snapshot of that mode captured after the post-action wait, removing the need for a follow-up read_page call. Default: "none". |