page.type
Types text into a specified web page element with real key events so each keystroke is registered, then reads the field back to verify what landed.
Instructions
Type text into an element, with real key events so the page sees each keystroke. Newlines become Enter in textareas and contenteditables; on a single-line input they are reported as dropped rather than silently flattened. Reads the field back so landed_characters is measured, not assumed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "page.type"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | Zero-based index when the locator matches several elements. | |
| ref | No | Snapshot ref (eNN) from page.snapshot. | |
| text | Yes | ||
| clear | No | Clear the field first. | |
| xpath | No | XPath expression. | |
| delay_ms | No | ||
| frame_id | No | Frame to search within; see page.list_frames. | |
| selector | No | CSS selector; pierces shadow DOM. | |
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| insert_text | No | Paste in one Input.insertText instead of per-key events. Much faster and newline-safe, but the page sees no keydown/keyup. | |
| press_enter | No | ||
| backend_node_id | No | CDP backendNodeId, e.g. from inspector.pick. |