If There are two Drop Down Box Under same class name den how to select last option or any option …..?

Please suggest…

Ashu Default Asked on March 4, 2015 in Selenium WebDriver.

try identifying them with xpath

on March 4, 2015.
Add Comment
4 Answer(s)

Try to check for some other distinct attribute along with class name

raj224in Default Answered on March 4, 2015.
Add Comment

Can we get the HTML of the drop downs or may be the link to the page?

Virender Singh Professor Answered on March 5, 2015.
Add Comment

The one word answer to you question is XPATH indexing , just google it and u will get u r answer 😉

I can give u one example

So if in u r html u have 2 images with same title and there is no other attribute developer has used and u have to click first /second then u can use

amitjain Supporter Answered on March 10, 2015.
Add Comment

Just try with ” :nth-child() ” option, with CSS Selector. Or, post the .html then after will let you know.

Unless it is very much needed, just deffer to use Xpath.

jituvrma007 Default Answered on March 11, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.