This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes How to select item if items having same class name using CSSSelector in Selenium webdriver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How to select item if items having same class name using CSSSelector in Selenium webdriver" Watch "How to select item if items having same class name using CSSSelector in Selenium webdriver" New topic
Author

How to select item if items having same class name using CSSSelector in Selenium webdriver

Arun chandu
Greenhorn

Joined: May 28, 2013
Posts: 11
Hello,

I am trying to automate one application using web-driver and Java. However I'm facing problem on selecting option. I need to click on image to open/display the option and it will make that DIV tag to visible. Here for your ref below

I tried with so many ways using xpath but only one or two time its selecting out of 10.



I think, its better to use CssSelector and the present problem is div tag will be disable until we click on image beside textarea field and also all class names of the drop down are same only difference is 'arvalue' option but i never heard before in table. I'm posting the source code as well.

Please help me how to select the items... Thanks in Advance

Regards
Arunchandu Ganta



[drop.JPG]


[Thumbnail for firebug.JPG]

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32508
    
214

I'm confused. Where is the image you are trying to click in that HTML screenshot?


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Arun chandu
Greenhorn

Joined: May 28, 2013
Posts: 11
I marked with Red color in Dropdown image attached. I can able to click in that image and after that option are getting displayed however Im not able to select the those options. You can see the option code in above image.



[drop.JPG]

 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to select item if items having same class name using CSSSelector in Selenium webdriver
 
It's not a secret anymore!