Fill input
fillReplace input, textarea, select, or contenteditable content with a new value, triggering input events for React/Vue. Verifies the value landed, returning an error if not.
Instructions
Set the value of an input, textarea, select or contenteditable element.
Selects whatever is already in the field and types over it, character by
character, so input events fire and React/Vue-style controlled components
register the change. It deliberately does not blank the field first: that
makes such components re-render, the focus follows the replaced node, and
the keystrokes end up nowhere. For , the option is chosen by value
and a change event is dispatched.
The value is read back afterwards. If it did not land you get an error, not a success you cannot trust — a field can be read-only, disabled, covered by an overlay, or rewrite what you type, and silently reporting success would send you looking for the problem several steps later.
Use type_text instead when you want to append to a focused field rather than replace its contents. For several fields at once, fill_form does it in one round trip.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Element uid from the most recent take_snapshot, e.g. "4_12". uids are invalidated whenever the page changes — if you get "unknown uid", take a fresh snapshot and retry with the new uid. | |
| value | Yes | The text to enter. For a <select> element this must match the option's value attribute, not its visible label. | |
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| include_snapshot | No | Append a fresh page snapshot to the response. Worth it when this action changes the page and take_snapshot would be your next call anyway — it saves a round trip, at the cost of a much larger response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |