webpage_fill_form
Fill SEVERAL fields of a form in one call on the device browser — the batch form of webpage_type, and the counterpart to Playwright MCP's browser_fill_form. Works on BOTH iOS Safari and Android Chrome. Fields are filled IN ORDER inside a single browser session, which is what makes this different from calling webpage_type N times: order-dependent forms (a country select that repopulates the state list, an autocomplete that rewrites the next field) behave the way they do for a real person, and you pay one round trip instead of N. Each field takes the same target shape as webpage_type — a CSS selector or a ref from webpage_snapshot — plus text, and an optional per-field clear. On iOS each field is typed on the DEVICE keyboard so the page receives real trusted keystrokes; where that is unavailable it falls back to setting .value via the native setter and dispatching bubbling input/change (isTrusted:false), reporting via and fallbackReason PER FIELD so a degraded field is never hidden by its neighbours succeeding. exact:false on a field means the keystrokes landed but the component rewrote the value as you typed (masks, autocompletes) — that is a success, not a failure. Stops at the first failure by default, because a form is usually order-dependent and filling past a field that did not take produces a state no one asked for; pass continueOnError:true to attempt every field anyway, which is what you want when diagnosing WHICH selectors are stale. This does NOT submit the form — follow it with webpage_press_key("Enter") or webpage_click on the submit control. ONE CROSS-PLATFORM TRAP, measured on device: change fires differently. Android dispatches change on every field. iOS fires it only on a real BLUR, and the LAST field still holds focus when this returns — so its change has NOT fired, and a form that validates on change will not have seen the final field. Follow with webpage_press_key("Tab") or a click elsewhere if that matters. Also on iOS, a field filled with clear:true emits one isTrusted:false input carrying the empty value (the wipe) before the trusted keystrokes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Device UDID / serial (iOS or Android) | |
| clear | No | Default for every field that does not set its own `clear` (default: false) | |
| fields | Yes | Fields to fill, in the order they should be filled | |
| pageId | No | Target page/tab id — auto-picked when omitted | |
| socket | No | Android only: abstract unix socket name (default: chrome_devtools_remote) | |
| require | No | Set to "native" to fail a field loudly when the device keyboard is unavailable, instead of silently setting .value (isTrusted:false). iOS only. | |
| continueOnError | No | Attempt every field even after one fails, instead of stopping at the first failure. Use it to find out which selectors are stale in one round trip; leave it off for order-dependent forms. | |
| platformVersion | No | Ignored (kept for compatibility) |