page_type
Types text into the focused element or a CSS/locator field in a browser tab via CDP, with optional clearing and submit key. Ensures trusted input events and supports nested frames.
Instructions
Insert text into the focused element or a CSS/structured-locator field in a specific tab using background CDP input; xterm containers automatically retarget their helper textarea. Optionally clear and submit a key. Missing, ambiguous, or unusable targets dispatch nothing. CSS/structured matches are reduced to visible, interactable candidates so hidden templates do not win; the resulting input event is trusted in the page. The result includes active_element and focus_confirmed so omitted-selector input is auditable. Nested frame locators support same-origin, cross-origin and OOPIF targets. A call retains the selected document and element, then checks the focus chain before each input. Navigation or replacement returns stale_frame; inspect input_dispatched and do not replay partial or unknown input. A new independent call can locate the new document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| clear | No | ||
| timeout | No | ||
| selector | No | ||
| session_id | No | ||
| submit_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||