How do you get all the values from Drop Down list?
Answer Posted / p sureshchowdary
Select dropdown=new Select(d.findElement(By.id("month")));
List<WebElement> list=dropdown.getOptions();
for(WebElement we:list) {
System.out.println(we.getText());
}
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the difference between getwindowhandles() and getwindowhandle()?
Is selenium server needed to run selenium webdriver scripts?
How does one capture a page title in selenium 2.0?
What is the command to connect a node to the selenium grid?
Why should Selenium be selected as a testing tool?
Why selenium rc is used?
Please explain what are the different types of locators in selenium?
What are the different Exceptions in selenium?
What is the difference between driver.getwindowhandle() and driver.getwindowhandles() in selenium?
List some of the common automation frameworks.
Have you created any framework?
What is the difference between driver.findelement() and driver.findelements() commands?
What are the different types of web controller APIs supported in Selenium?
What is parameterization in testng?
How to press enter key on text box in selenium webdriver?