playwright-browser-select-option
To choose an option in a dropdown, select one or more values in a select element.
When & Why to Use This Skill
The playwright-browser-select-option skill enables Claude agents to programmatically interact with HTML dropdown menus and select elements. By leveraging Playwright's browser automation capabilities, it allows for the precise selection of single or multiple values, making it an essential tool for navigating complex web forms and automating browser-based workflows.
Use Cases
- Automated Form Filling: Streamline the process of completing online registrations or surveys by automatically selecting options like country, state, or category from dropdown menus.
- E-commerce Navigation: Automate the selection of product attributes such as size, color, or shipping methods during automated purchasing or price monitoring tasks.
- Web-Based Configuration: Manage settings in administrative dashboards or cloud consoles where configurations are modified via select elements.
- QA and Regression Testing: Enhance automated testing suites by verifying that dropdown menus function correctly and accept the intended input values across different web environments.
| name | playwright-browser-select-option |
|---|---|
| description | "To choose an option in a dropdown, select one or more values in a select element." |
Usage
Use the MCP tool dev-swarm.request to send the payload as a JSON string:
{"server_id":"playwright","tool_name":"browser_select_option","arguments":{}}
Tool Description
Select an option in a dropdown
Arguments Schema
The schema below describes the arguments object in the request payload.
{
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "Human-readable element description used to obtain permission to interact with the element"
},
"ref": {
"type": "string",
"description": "Exact target element reference from the page snapshot"
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of values to select in the dropdown. This can be a single value or multiple values."
}
},
"required": [
"element",
"ref",
"values"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
Background Tasks
If the tool returns a task id, poll the task status via the MCP request tool:
{"server_id":"playwright","method":"tasks/status","params":{"task_id":"<task_id>"}}