• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic