type
Fill input, textarea, or editable fields using a selector or ref; clears the current value first, then sends keystrokes, with optional Enter to submit.
Instructions
Type text into an input, textarea, or other editable element. Waits for it to be visible, clears the current value first (clearFirst: false appends instead), then sends the text as keystrokes so the page's input events fire; submit: true presses Enter afterwards. Target it by selector or by a ref from capture_page. For dropdowns use select_option; for single keys like Tab or Escape use press_key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from the latest capture_page result (e.g. 'e12'). Use instead of selector; refs go stale after navigation, so capture again if one is rejected. | |
| text | Yes | The text to type, e.g. 'standard_user'. | |
| submit | No | Press Enter after typing (default false), e.g. to submit a search box or login form. | |
| selector | No | How to find the element, e.g. { by: 'id', value: 'user-name' } or { by: 'css', value: '#login-button' }. Provide either selector or ref. | |
| timeoutMs | No | How long to wait for the field to become visible, in milliseconds (default 10000). | |
| clearFirst | No | Clear the field before typing (default true). Set false to append to the existing value. |