Quality is delighting customers
How to get the count of items in a list box using Selenium?
Thanks in advance.
R,
Namrata
Tags:
you have use selenium RC for this.
You can use any language to get count of list items.
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);
© 2021 Created by Quality Testing.
Powered by