I have a test case contains drop down list
and after run my test case i get this error
@sara.alyahya You likely have a selectOptionByValue or selectOptionByLabel on an element that is NOT a select. You may have it named select…, but when you look at the tag inside the TestObject, you have it as an input.
(An input is a textbox, radio button or checkbox; a select is a drop-down list.)
Double click on the element within the Object Repository and look at the element’s list of attributes–especially the tag attribute. You should now look at the page’s source code and Inspect the element to get more information. If you show some of your HTML we should be able to give you more assistance.
@sara.alyahya Note the tag (the first word in the darker blue highlighted area) is an input. Although the class attribute has “select2-search__field” and the placeholder attribute has “Select a Indicators”, the element is NOT a select drop-down. Try setText to put values into the textbox field, and you will have to Inspect again afterwards to see what appears for the search aspect.
https://www.w3schools.com/tags/att_input_type_search.asp
As a note, in your image above, the Report Code and Branch are both drop-downs (and should be select). The indicator is the down arrow on the right hand side.