type_text
Set text in input, textarea, or contenteditable fields by selector/ref, replacing values and firing input/change events so controlled inputs update. Use key-by-key mode for autocomplete or masked fields.
Instructions
Put text into an input, textarea or contenteditable, by selector or ref. Replaces the whole value through the native setter (React/Vue controlled inputs register it) and fires input and change. mode=keys emits keydown/input/keyup per character for autocomplete and masked fields: slower, use it only when mode=set leaves the field empty. Returns value_after; mismatch=true means the field did not keep the value: retry with mode=keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | From get_interactives, e.g. "n3" | |
| mode | No | set = assign value; keys = per-char events (autocomplete/masked); trusted = real input via chrome.debugger, main frame | set |
| text | Yes | Value to type; empty string clears the field | |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| frame_id | No | Target iframe id from get_frames; omitted = main frame | |
| selector | No | CSS selector; ">>>" pierces shadow DOM. Ignored when ref is given | |
| wait_after | No | Settle before returning: navigation waits for a page load, networkidle for quiet traffic | none |