select_option
Pick a dropdown or radio option by its text in the active browser tab, covering native selects, radio groups, searchable comboboxes, and script-drawn lists.
Instructions
Choose an option in a dropdown or a radio group by its text, in the session's active tab. Works on a native <select> (set directly, firing input and change), on a radio group (pass a radio, its fieldset or a role=radiogroup; the option is clicked as a person would and checked to be selected) and on custom dropdowns drawn by scripts (a combobox, a React or other component select, a searchable list): it opens the dropdown with a real click, types option to filter when the option isn't in the list showing (long lists drawn in part, and lists searched as you type), clicks the option, and reads the field back. option matches exactly ignoring case, else the shortest option starting with it, else the shortest containing it. selector is the dropdown: the select, the combobox input or the box you'd click to open it (CSS, or plain words as for click). Without option, opens the dropdown, returns its options and closes it, choosing and typing nothing: look before you pick. It types only when the list may be partial (empty, loading, or 20 options or more), and clears what it typed when nothing matches. Returns what was chosen, the options offered, what the field shows after and whether that is the option (confirmed; a field can show a short form, such as "+1" for a country), with where the page is as for click. Fails listing the options offered when none matches, or when no list opens.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"selector": "<selector>"
},
"name": "select_option"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| option | No | The option's text, or the start of it ("United States" picks "United States +1"). Leave it out to list the options without choosing. | |
| timeout | No | Milliseconds to wait for `selector` to appear. Default 5000. | |
| selector | Yes | The dropdown: a `<select>` (or its label), the combobox input, or the box you'd click to open it. CSS, or plain words as for click. | |
| sessionId | Yes | The id returned by open_browser_session. Errors if no open session has it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hit | No | What was at the clicked or tapped point. | |
| url | Yes | The page's URL after the action. | |
| shown | No | What the field shows after: a native select's option, or the text by a custom dropdown. | |
| title | Yes | The page's title after the action. | |
| chosen | No | The option picked, as the list shows it; absent when only listing. | |
| dialog | No | An open dialog's text, if one is showing. | |
| changed | No | A field `type` filled that the page changed once focus left it (a date that reformats or reverts on blur), with both texts. | |
| focused | Yes | The element with keyboard focus, or "nothing". | |
| options | Yes | The options of a dropdown or list open after the action (the one the focused field controls, else any showing), up to 50: pick one with select_option or click. | |
| answered | No | The page's own dialogs (alert, confirm, prompt, "Leave site?") answered since the last action, each accepted. | |
| rejected | No | Fields the page rejected during the action, each with its message: the browser's own form check (a required field left empty), or the page marking them invalid. The form wasn't sent while any remain. | |
| confirmed | No | Whether the field shows the chosen option. | |
| navigated | Yes | Whether the URL changed. | |
| focusTrail | No | With press_key's `repeat`: the focused element after each press. |