Quality Testing

Quality is delighting customers

How to get the count of items in a list box using Selenium?

How to get the count of items in a list box using Selenium?

 

Thanks in advance.

 

R,

Namrata

Tags: box, count, list, selenium

Views: 225

Reply to This

Replies to This Discussion

you have use selenium RC for this.

 

You can use any language to get count of list items.

 

 

Yes I am using Selenium RC.

you can use like

 

int values = value.hashCode();

for (int i = 0; i < value.length; i++) {

String listitems= value[i];

System.out.println("listitems: "+listitems);

}

 

 

you can use this code also

 

String[] options = selenium.getSelectOptions("xField");     

 

    int count = options.length;     

    System.out.print(count);

RSS

TTWT Magazine

Webinar

You Can


Call for Articles

Advertisement

Videos

  • Add Videos
  • View All

Badge

Loading…

© 2012   Created by Quality Testing.

Badges  |  Report an Issue  |  Terms of Service