selenium - I am not able to select option value from drop down list .select tag not containing any id or class or name -


I'm not able to select an option value from the drop down list. There is no ID or class or name in the selection tag.

  & lt; Select & gt; & Lt; Option title = "select" value = "" & gt; Select & lt; / Options & gt; & Lt; Option title = "Packages" value = "PK" maxCount = "1" cgCount = "0" & ​​gt; Package & lt; / Option & gt; & Lt; / Select & gt;    

Use it, my works :):

  Web Element element = Driver.Finded Element (Byte xpath ("// selection")); Select dropdown = new selection (element); Dropdown.selectByIndex (1);   

Source:

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -