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 are the popular programming languages supported by selenium webdriver to write test cases?
How to upload a file in selenium webdriver?
How to perform right click using webdriver?
How to pause a test execution for 5 seconds at a specific point?
What is the use of deselect all () method?
When do you use selenium grid?
What is the use of @listener annotation in testng?
Explain using webdriver how you can perform double click?
What is Selenese?
How to configure selenium web driver in eclipse?
Does the selenium have any limitations?
What if you have written your own element locator and how would you test it?
Mention what is the use of x-path?
What are the open-source frameworks supported by selenium webdriver?
Explain what is datadriven framework and keyword driven?