How to automate select lists
If you are automating forms, one of the actions you will most likely need to automate is interacting with a select list. The primary method for doing this is the Select list step.
# Automate using the "Select list" step
To automate a dropdown menu (select list), use the Step Finder to search for "Select" and then add the "Select list" step.
How
- Click "Select" to choose the select list.
- Input the option the bot should select, or use data.
# Use Click element and Enter text
In certain cases, you can select an option in a dropdown field by simply typing the desired text. The dropdown will automatically filter and highlight the closest match based on the text entered:
How
- After a page is loaded (With a "Go to page" step for example) click the “Add step” button.
- Choose "Click element" in the step listing and click the select list.
- Choose "Enter text" in the step listing.
- In the “Text” field input the select list value for the bot to select.
# Use Click element and Press key(s) steps
It's also possible to automate a select list by combining the "Click element" with the "Press key(s)" step. The process involves first triggering a click event on the dropdown field to expose the options, then emulating keyboard arrow key presses to navigate through the options, and finally using the "Enter' key press to select the desired option.
How
- After a page is loaded (With a "Go to page" step for example) click the “Add step” button.
- Choose "Click element" in the step listing and click the select list.
- Choose "Press key(s)" in the step listing.
- Input the necessary keypresses to select the correct option. For example, to select option 2, “Arrow down”, “Arrow down”, “Enter”
# Automate a select lists with JavaScript
If you are familiar with JavaScript or perhaps using ChatGPT to generate code, you can use our JavaScript step to automate actions such as select lists. We usually save this method as a last resort.