Fill Form
operagx_fill_formFill multiple form fields in a single call and optionally press a submit key. Target elements by ID, selector, or coordinates on any tab.
Instructions
Fills multiple fields in one call and optionally submits at the end. Each field targets an element the same way as operagx_click (elementId/selector/x+y).
Args:
tabId / tabIndex / matchUrl / matchTitle (optional): which tab to fill.
fields (array, min length 1): each item is { elementId? | selector? | x?+y?, value: string }.
submitKey (string, optional): e.g. "Enter" to press after the last field. Omit to skip.
Returns: { "ok": true, "fields": [ { "filledAt": { "x": number, "y": number, "selector"?: string }, "value": string } ] }
Examples:
Use when: "log in with username tomsmith and password foo" -> map_elements for both field ids, then fill_form with both, submitKey="Enter".
Don't use when: only one field needs filling — operagx_type_text is simpler for that case.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab id from operagx_list_tabs. Omit to use the first open tab. | |
| fields | Yes | Fields to fill, in order. | |
| matchUrl | No | Pick the tab whose URL contains this substring. | |
| tabIndex | No | Zero-based tab index, alternative to tabId. | |
| submitKey | No | e.g. "Enter" to press after the last field. | |
| matchTitle | No | Pick the tab whose title contains this substring. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| fields | Yes |