fill_input
Fills input fields via CSS selector by inserting text and triggering input/change events. Use to populate forms, search boxes, and text areas.
Instructions
Focuses an input field via CSS selector and inserts text using native input simulation, triggering input/change events. Side effects: modifies DOM input value; triggers input/change event handlers. Prerequisites: element must exist, be visible, and be an input/textarea or contenteditable element. Returns: success confirmation. Use this to populate form fields, search boxes, text areas. Alternatives: 'evaluate_js' for direct value assignment without events, 'click_element' to focus manually.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text content to insert. Constraints: any string (special chars escaped automatically). Interactions: replaces any existing text after focus; triggers input/change events. Defaults to: None (required). | |
| tab_id | No | The Tab ID of the target tab. Omit to use the active tab. | |
| selector | Yes | CSS selector identifying the input element. Constraints: valid CSS selector matching an input/textarea/contenteditable element. Interactions: element must be focusable and writable. Defaults to: None (required). | |
| instance_id | No | Chrome instance id from open_instance/list_instances. Omit for the default instance. |