• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Arun chandu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 drop.JPG]
Dropdown
firebug.JPG
[Thumbnail for firebug.JPG]
Source Code
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused. Where is the image you are trying to click in that HTML screenshot?
 
Arun chandu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
[Thumbnail for drop.JPG]
Dropdown
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic