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"

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

Notes

Either index or value must be provided. Do not use both at the same time.

Go deeper in the Scrappey knowledge base: