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

Views: 1138

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


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service