Skip to content

Select Dropdown Option By Index: SELECTBYINDEX

The Select Dropdown Option By Index action is used to select a specific option from a dropdown list by its position in the list. The options in the dropdown are ordered numerically starting from index 0 for the first item. This action only works on HTML <select> elements and selects an item based on its index rather than its value or visible text.

Example: Let’s suppose you have a dropdown for months, and you want to select “March” using its index in the dropdown (2, as January is index 0 and February is index 1).

The HTML code for the dropdown might look like this:

v7_select_operation_sample_html2
Steps to configure:

  1. Select the SELECTBYINDEX action from the Action drop-down.
  2. In the Screen Name field, select the screen where the drop-down is located (e.g., Registration Form).
  3. In the Element Key field, select the drop-down element (e.g., Months).
  4. In the Parameters section, provide the index of the option you want to select (e.g., 2). Since “March” is the third option in the list, its index is 2.
  5. Click Save.
Note: While the steps for adding an Action are identical in both views, the display of the steps changes:
v7_select_operation_selectByIndex_list_view
List View
v7_select_operation_selectByIndex_grid_view
Grid View
Note: Ensure that the Screen Name and Element Key are pre-defined before using this action.

Expected Outcome on Execution: 

  • The automation will successfully select the “March” option in the dropdown, making it the active selection.
  • Since dropdown indexing starts from 0, the third option (“March”) corresponds to index 2 and will be selected.

Last updated: Sep 12, 2025
Back To Top