Overview
The Select Option step lets you choose options from dropdown menus and select elements. Whether you’re selecting countries, categories, sizes, or any dropdown value, this step handles both native HTML selects and many custom dropdown implementations.When to Use Select
Use Select when you need to:- Choose from dropdown lists: Select countries, states, categories, or other preset options
- Configure form settings: Pick values like sizes, colors, quantities, or priorities
- Filter content: Select filter options in search forms or data tables
- Set preferences: Choose user preferences or application settings from dropdowns
- Test dynamic dropdowns: Verify options that change based on previous selections
How It Works
Select finds a dropdown element using a CSS selector and chooses an option by matching the visible text or the option’s value attribute. It works with standard HTML<select> elements and triggers all the same events a real user selection would - change, input, blur.
The step is smart about matching: it looks for exact matches first, then tries partial matches if needed. This makes it flexible enough to work with dropdowns that have similar option names.
Using the Select Step
When you add a Select step, you’ll configure:Finding Your Dropdown
Use the element picker to visually select the dropdown element, or enter a CSS selector directly. For HTML<select> elements, target the <select> tag itself. For custom dropdowns, you might need to target the container or trigger element.
Specifying the Option
Enter the option you want to select. You can use:- Visible text: What the user sees in the dropdown (“United States”, “Large”, “High Priority”)
- Value attribute: The underlying value (“US”, “lg”, “high”)
- Environment variables:
{{REGION}}to select different options per environment
Real-World Examples
Selecting a Country
Changing Product Size
Filtering Search Results
Environment-Specific Selection
Cascading Dropdowns
Best Practices
Use Visible Text When Possible
- Select by what users see: “United States” instead of “US”
- This makes tests more readable and maintainable
- Falls back to value matching automatically if text doesn’t match
Handle Dynamic Options
- If options load dynamically, add Wait for Element first
- For cascading dropdowns, wait for each dropdown to populate before selecting
- Check that dropdowns aren’t disabled before attempting selection
Write Stable Selectors
- Target
<select>elements directly:select[name='country'] - Use
data-testidattributes:[data-testid='size-selector'] - For custom dropdowns, work with your developers to add test IDs
Verify Selection Results
After selecting an option, verify the result:- Use Check Text to verify selected value displays correctly
- Use Check Visibility to verify dependent content appears
- Use Check URL if selection updates query parameters
Troubleshooting
Option Not Found
Symptom: Test fails saying the option doesn’t exist Solution:- Verify the option text matches exactly (case-sensitive by default)
- Check that the option exists in the dropdown when the test runs
- For dynamic dropdowns, add a wait to ensure options are loaded
- Try using the value attribute instead of visible text
Dropdown Not Found
Symptom: Test can’t find the select element Solution:- Use the element picker to target the correct element
- Verify you’re targeting the
<select>element, not an<option> - For custom dropdowns, you might need to click to open them first
- Check that the dropdown is visible and not hidden by CSS
Custom Dropdown Doesn’t Work
Symptom: Selection doesn’t work on custom dropdown Solution:- Custom dropdowns (not native
<select>) might need Click to open first - You may need to click the option directly instead of using Select
- Work with your developers to make custom dropdowns testable
- Consider using AI Action for complex custom dropdowns
Selection Doesn’t Trigger Events
Symptom: Selecting an option doesn’t trigger expected behavior Solution:- Verify the dropdown has change event listeners
- Check that the application responds to the selected value
- Some apps need additional actions (like clicking submit) after selection
- Test manually to confirm the dropdown works outside automation
Wrong Option Gets Selected
Symptom: A different option than intended is selected Solution:- Check for partial text matches - use more specific option text
- Verify the dropdown doesn’t have duplicate option values
- Ensure you’re selecting from the correct dropdown if multiple exist
- Use exact value matching if text matching is ambiguous
Related Steps
- Click - Open custom dropdowns before selection
- Fill - For text input fields (use Select for dropdowns)
- Wait for Element - Wait for dynamic options to load
- Check Text - Verify selected value

