aspose file tools*
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 Spring in Action this week in the Spring 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: 30753
    
156

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, 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 agree. Here's the link: http://aspose.com/file-tools
 
subject: How to select item if items having same class name using CSSSelector in Selenium webdriver