Get Element Index Action: GETINDEX
The Get Element Index Action identifies all elements that match a specified locator, searches for an element containing a specific value, and stores its index in a variable. This function is useful when dealing with lists, dropdown menus, or repeated UI components, where identifying the position of an element dynamically is required.
Example: Suppose you have a dropdown menu listing different product categories:
Index | Category Name |
0 | Home Appliances |
1 | Fashion |
2 | Books |
3 | Electronics |
If you need to find the index of “Electronics”, the Get Element Index Action will return 3.
Steps to configure:
- From the Action dropdown, select Get Element Index.
- In the Screen Name field, enter the name of the screen where the dropdown exists (e.g., “Product Filter Screen”).
- In the Element Key field, choose the locator for the group of elements you want to search through (e.g., Category Dropdown).
- In the Parameters field, type the value you want to match (e.g., Electronics).
- Click Save.
Note: While the steps for adding an action are identical in both views, the display of the steps changes:


Expected outcome on Execution:
- If “Electronics” is found in the dropdown list, its index (3) will be stored in variable defined in the Element Key field (e.g., Category Dropdown).
- This value can be retrieved using the syntax ${Variable Name} (e.g., ${Category Dropdown}) and used later in the automation.