How to find duplicate values in dropdown in selenium?
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.
How many items in a dropdown is too many?
In General, Avoid Drop-Downs When There Are More Than 10 or Fewer Than 5 Options.