webpage_type
Type text into an input/textarea in the device browser, by CSS selector or by a ref from a page-elements listing — works on BOTH iOS Safari and Android Chrome. On iOS it taps the field and types on the DEVICE keyboard, so the page gets real trusted keystrokes (keydown, keypress, beforeinput, input) exactly as from a person — use this for anything that reacts to typing rather than just reading .value. Otherwise it sets the value via the native HTMLInputElement/HTMLTextAreaElement value setter (so React/Vue-controlled inputs register the change) and dispatches bubbling input and change events, which are isTrusted:false. The response reports which happened via via ("nativeKeyboard" or "jsValue"), and when it fell back to jsValue it names the cause in fallbackReason — you never have to guess whether a degraded path was taken. Pass require:"native" to make an unavailable device keyboard a hard error instead of a silent downgrade, for fields that only behave correctly under real keystrokes. exact:false means the keystrokes landed but the component rewrote the value as you typed (masks, autocompletes) — that is a success, not a failure. By default appends to the existing value; pass clear:true to replace it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from a page-elements listing, e.g. "e12". Provide this or `selector`. A ref points straight at the element it was issued for, so it survives markup that shifted position, and it can address elements no CSS selector can reach from the top of the page. | |
| text | Yes | Text to type | |
| udid | Yes | Device UDID / serial (iOS or Android) | |
| clear | No | Replace the existing value instead of appending (default: false) | |
| 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 loudly when the device keyboard is unavailable, instead of silently falling back to setting .value (isTrusted:false). Use for fields that gate on real keystrokes. iOS only — Android has no native-keyboard path here. | |
| selector | No | CSS selector for the target element. Provide this or `ref`. | |
| platformVersion | No | Ignored (kept for compatibility) |