How to identity and select text Drop down in webpage

how to select an item from text drop down ? , I have a drop down which will show results when passing some text to it and i need to select one of the item from the list.

Hey ! I recommend this answer :slight_smile:

Logic below
Get attributes of all the options of a dropdown, Only one option of all option will have a html attribute “selected” , take the text of the option (which mean this is selected in the dropdown).

Please let me know if it works for you.


  <option value="volvo">Volvo</option>
  <option value="saab" selected >Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>