select_option
Select an option from a native HTML dropdown by visible text, value attribute, or index. Use a CSS selector to target the element and set the chosen value.
Instructions
Select an option from an HTML dropdown.
Args: dropdown_selector: CSS selector identifying the element. value: The option's visible text, its HTML value attribute, or its 0-based index, depending on by. by: - "text": Match the option's visible text. - "value": Match the option's HTML value attribute. - "index": Match the option's 0-based position. Both integer and numeric-string values are accepted.
Raises: An error when the dropdown or requested option cannot be found.
This tool is for native elements. For custom JavaScript dropdowns made from div/button/list elements, use click or other element-interaction tools instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | text | |
| value | Yes | ||
| dropdown_selector | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |