The "Select pull-down menu" command can only be used with a standard HTML <select> element. If a non-select element is specified, an error message will appear, stating:
The HTML tag of the target element of the "Select" command must be "select", but the HTML tag of the element "" is "**".
To fix this issue, try one of the following solutions.
1. Look for a Select Element
- Temporarily hide the element and check if there is another valid <select> element.
- A valid select element has the following characteristics:
- Element name: Combo box
-
Locator:
- CSS: Starts with select (e.g., css=select.***)
- XPath: Ends with select (e.g., xpath=//***/select[1])
- If you find a valid select element, update the UI element for the Select pull-down menu command.
2. Change the Command to Click
If no <select> element is found, the dropdown menu is not a standard HTML select element. In this case, the Select pull-down menu command cannot be used. Instead, use the Click command:
- Click the UI element of the dropdown menu (select box).
- When choices appear, capture the UI again and click a UI element of your choice.