How can I get all elements from a drop down list? I used the code below:
List elements = driver.findElements(By.id(\"s\"));
Select drop = new Select(driver.findElement(By.id("id"))); List dd = drop.getOptions(); System.out.println(dd.size()); for (int j = 0; j < dd.size(); j++) { System.out.println(dd.get(j).getText()); }