How to find duplicate values are present in drop down list box

1,636 views
Skip to first unread message

Zakaulla Cma

unread,
Sep 3, 2015, 11:02:58 AM9/3/15
to webdriver
How to find duplicate values are present in drop down list box

darrell

unread,
Sep 10, 2015, 12:17:16 PM9/10/15
to webdriver
Use Selenium to find the list (driver.findElements() method). Iterate over the List<WebElement> and store the values in a List<String>. Then you want to sort the List and see if there are duplicates in it. Finding duplicates in a List<String> is really a Java problem. You can google for a solution to this problem without even considering that the list came from Selenium.
Reply all
Reply to author
Forward
0 new messages