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
How to handle the AJAX popup window?
How to find the xpath of web table elements.in chrome or internet explorer.or without using fire bug.?
What is an explicit wait in selenium?
Explain the fundamental difference between xpath and css selector.
What are the advantages of selenium webdriver?
How can we find the value of different attributes like name, class, value of an element?
What is Selenese?
what is assertion in selenium and what are the types of assertion?
What are the two modes of views in selenium ide?
Do you know what are the main advantages of selenium grid?
How to check if a text is highlighted on the page ?
What you know about selenium?
What is an implicit wait in selenium?
How to get the title of the page?
How can you fetch an attribute from an element? How to retrieve typed text from a textbox?