type
Enter text into inputs, textareas, or contenteditable elements using real keyboard events; focus and clear a target field or use current focus, and optionally press Enter to submit.
Instructions
Type text into an input, textarea or contenteditable using real keyboard input events. If an element is given (ref, selector or match) it is focused and, by default, cleared first; otherwise the text goes to the element that already has focus. submit=true presses Enter afterwards and, if that navigates, reports the new page. Returns the number of characters typed. To set several fields, selects or checkboxes in one call use fill_form; for non-text keys such as Tab or Escape use press_key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from the latest snapshot or find, e.g. "e12". Preferred: unambiguous and fastest; stale after navigation. | |
| tab | No | Tab id from tabs_list. Defaults to the current tab. | |
| text | Yes | Text to type, inserted as typed input. | |
| clear | No | Clear the field before typing (default true when an element is given; set false to append). | |
| match | No | Visible text or accessible name to match (case-insensitive substring), e.g. "Sign up"; use when you have no ref. | |
| submit | No | Press Enter after typing, e.g. to submit a search box (default false). | |
| selector | No | CSS selector; the first matching element is used. |