browser_input_text
Types text into browser elements by number or focus, including dropdowns, dates, times, and mid-field edits without opening pickers.
Instructions
Type text into an element by its number (emsn), or into whatever has focus when no emsn is given. Fails, typing nothing, when the field does not take focus. Also sets a dropdown (SELECT, or its label): text is the option exactly as listed in its options; and a date (YYYY-MM-DD), time (HH:MM), date and time (YYYY-MM-DDTHH:MM), month (YYYY-MM), week (YYYY-Www) or colour (#rrggbb) field, without opening a picker. Use this rather than clicking a SELECT: its list is not in snapshots. To edit a text field or editable area (a mail body, a rich-text editor) in the middle, give one of before / after / replace / at with its emsn. Copy the words from its snapshot value as they are written there: \n for a line break, ¤ escapes kept; ‸ (the caret) and ⟦⟧ (the selection) are ignored. Not found, or found in several places without occurrence: nothing is typed and the places are listed. The text is read back afterwards and the reply quotes the changed lines; if they differ (the editor reformatted it), it fails saying the text was typed. Without these, text goes in at the caret; the element is clicked first unless focus is already in it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | Type at the start or end of the element's text. | |
| emsn | No | Element number to type into. | |
| text | Yes | The text to type, as it is; empty with replace deletes. | |
| after | No | Type just after these words. | |
| tabId | No | Tab to act on. Defaults to the foreground tab of that window. | |
| before | No | Type just before these words. | |
| replace | No | Replace these words with text. | |
| windowId | No | Window to act on. Defaults to the frontmost window. | |
| clearText | No | Clear the field first instead of appending. Not with a place: it clears a whole mail body, quote and signature too. | |
| occurrence | No | Which place, from 1, when the words are in several; overlaps count. | |
| pressEnter | No | Press Enter after typing, as a person does: it submits a form, and adds a line in a multi-line box. | |
| snapshotId | Yes | The snapshotId from the browser_take_snapshot you picked the emsn out of. An element keeps its emsn while the page stays (no navigation or reload), so with an emsn any snapshot of the current page is accepted; with x,y only the latest one is. A number whose element has gone is refused rather than clicked. |