Trusted Type
trusted_typeType text into an input, textarea, or contenteditable using real events, so autocomplete and search-as-you-type fields react as if a user typed.
Instructions
Type into an input, textarea or contenteditable with real input events, so autocomplete dropdowns open and frameworks see genuine typing. Needs the DevTools engine. By default the text goes in as one insertText (fast, one trusted input event). per_key sends a real keydown, keypress, input and keyup for every character, which is what search-as-you-type boxes need. With no selector it types into the element that already has focus. Refuses a disabled, readonly or non-text element, and a field that does not take focus (nothing is typed then, rather than typing into another element). The result reports the field value afterwards (a password reports only its length).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | Which match to act on when several exist, 0-based | |
| text | Yes | Text to type | |
| clear | No | Select the existing contents first so the typed text replaces them | |
| exact | No | For "text=", "label=" and "placeholder=" selectors, require the whole trimmed text to equal the label. No effect on CSS, ref= or role= selectors. | |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first. | |
| per_key | No | Send keydown, keypress, input and keyup for each character instead of one insertText | |
| selector | No | Field to focus first. CSS selector, "text=Label", or ref=, role=, label=, placeholder= as in click. Omit to type into the focused element. |