Spotted something off?Report on Discord
guides
Dropdown Action
Select an option from a dropdown element on a webpage using a CSS selector with an index or value.
Updated May 28, 2025
Select an option from a dropdown menu on a webpage by targeting it with a CSS selector and specifying the desired option via index or value.
Command
"dropdown"
One of the browser actions β combine it with click and type actions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cssSelector |
string | Yes | CSS selector or XPath for the dropdown element. |
index |
number | No | Index of the option to select (starting from 0). Either index or value must be provided. |
value |
string | No | Value of the option to select (matches HTML value attribute). Either index or value must be provided. |
wait |
number | No | Time in seconds to wait after the action. |
waitForSelector |
string | No | Wait for a specific element after selection. |
timeout |
number | No | Max time in milliseconds to wait for the dropdown (default: 60000). |
ignoreErrors |
boolean | No | Continue even if the action fails. |
Example
bash20 lines
Want to run this request directly in your browser?to try it live with your own API key.
Notes
Either index or value must be provided. Do not use both at the same time.
Related concepts
Go deeper in the Scrappey knowledge base:
- Playwright β the automation engine behind browser actions
- Dynamic content scraping β working with interactive pages