ui_select
Selects an option in native or custom dropdowns by visible label or value. If no match is found, reports the visible options to identify the correct choice.
Instructions
Choose an option in a dropdown, by visible label or by value. Handles a native directly; for the custom dropdowns most applications actually use — a div that opens a list — it opens the control and clicks the matching option. Reports the options it could see when nothing matches, which is usually the whole answer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Match the label, the value, or either. | either |
| nth | No | Which match to use when several qualify, 0-based. | |
| role | No | Narrow the matches to this ARIA role. | |
| text | No | Visible text on the control. Matches the innermost element that carries it, and follows a <label> to its input. | |
| exact | No | Require the whole text to match rather than a substring. | |
| frame | No | 'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame. | main |
| option | Yes | The option's visible label, or its value attribute. | |
| testid | No | Value of a test attribute (data-testid and friends — see the testAttributes setting). | |
| selector | No | CSS selector. Descends into open shadow roots. | |
| timeout_ms | No | How long to wait for the element to become actionable before giving up. |