browser_select_option
Select an option from a dropdown menu. Works with native elements AND custom dropdowns (Angular Material, React Select, etc.). For custom dropdowns: clicks the trigger, waits for options, then clicks the matching option by text.
Instructions
Select an option from a dropdown menu. Works with native elements AND custom dropdowns (Angular Material, React Select, etc.). For custom dropdowns: clicks the trigger, waits for options, then clicks the matching option by text. For autocomplete (typing filters options) use browser_set_combobox instead. A custom dropdown's trigger gets the same check as browser_click: if the mouse would not reach it at its center, nothing is opened and the answer is ok:false with error "covered". So does the option once the list is open: if it is covered, it is not clicked, and the answer is ok:false with error "covered" and trigger_clicked: true - the list may still be open. If the click on the trigger was sent, but neither its press is shown to have reached it nor its click landed, no option is clicked and the answer is ok:false with maybe_landed: true; a click that cannot be checked in the page is not sent, and the answer says so; if it opens a dialog, or the option is not found, the answer has trigger_clicked: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Ms to wait after clicking trigger for options to appear (default: 300) | |
| option | Yes | Text OR value of the option to select. Exact value match wins, then exact text, then partial text. Aliases: `value`, `label`. Fails loudly with the available options if nothing matches. A controlled component may reset the field and store the choice elsewhere, so a success can come with `landed: null` and `maybe_landed: true`: the page changed, but the change does not prove it was the selection. Read the page before selecting again. | |
| selector | Yes | CSS or text selector for the dropdown trigger / <select> element |