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
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.
<select> <option value="volvo">Volvo</option> <option value="saab" selected >Saab</option> <option value="opel">Opel</option> <option value="audi">Audi</option> </select> </body> </html>