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 programming languages can you use in selenium rc?
How you can insert a start point in selenium ide?
What are the locators available in selenium?
Mention what are the challenges in handling ajax call in selenium webdriver?
How do you capture an element loading after the page load?
What is a keyword driven framework?
Which of the selector ID, name, XPath or CSS should I use?
Tell me how can we launch different browsers in selenium webdriver?
What are the different components of selenium?
What is difference between @factory and @dataprovider annotation?
How you can switch between frames?
What is selenium 3.0?
How many exemptions do you know in selenium webdriver?
Why to choose python over java in selenium?
How to pass parameters using testng.xml?