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 would you test your element locator?
What are the regular expression patterns available in selenium?
How you can use “submit” a form using selenium?
When to use accessors in selenium?
What is the difference between “/” and “//” in xpath?
What are the annotations used in testng?
What are the verification points available in selenium?
List out the names of programming languages, browsers and operating systems that are supported by selenium.
Explain what are the junits annotation linked with selenium?
How to handle frame in webdriver?
What is the framework?
What is same origin policy? How you can avoid same origin policy?
Tell us what are the two modes of views in selenium ide?
How are selenium ide, webdriver and selenium rc different from each other?
Mention when to use autoit?