Select Dropdown Option
operagx_select_optionSelects an option from a webpage dropdown by value, label, or index, using a CSS selector and optional tab targeting.
Instructions
Chooses an option in a native dropdown by value, label, or index.
Args:
tabId / tabIndex / matchUrl / matchTitle (optional): which tab.
selector (string): CSS selector for the element.
value / label / index: exactly one, identifying which option to choose.
Returns: { "ok": true, "selected": string[] } // the value(s) selected, per the DOM API
Examples:
Use when: "choose 'Option 2' from the dropdown" -> select_option with the select's selector and label="Option 2".
Error Handling:
Playwright throws if the selector doesn't resolve to a , or the option doesn't exist — the error message names the selector and requested value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Select the option at this zero-based index. | |
| label | No | Select the option with this visible label. | |
| tabId | No | Tab id from operagx_list_tabs. Omit to use the first open tab. | |
| value | No | Select the option with this value attribute. | |
| matchUrl | No | Pick the tab whose URL contains this substring. | |
| selector | Yes | CSS selector for the <select> element. | |
| tabIndex | No | Zero-based tab index, alternative to tabId. | |
| matchTitle | No | Pick the tab whose title contains this substring. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| selected | Yes |