Select Option
select_optionSelect one or more options in a element on a Playwright-controlled page using a CSS, text, role, test ID, XPath, or label selector.
Instructions
Select options in a element.
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": {
"selector": "<selector>",
"values": "<values>"
},
"name": "select_option"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | No | Page id. Defaults to the active page. | |
| values | Yes | ||
| selector | Yes | CSS selector, text=..., role=button[name="Save"], testid=..., xpath=..., or label=... | |
| timeoutMs | No | Operation timeout in milliseconds. |