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
Mention in what ways you can customize testng report?
Are you familiar with selenium? If yes, what is it?
Mention why do you need session handling while working with selenium?
Why should testers opt for selenium and not qtp?
What are the different types of drivers available on Webdriver ?
How to locate a link using its text in selenium?
Tell us what are the two modes of views in selenium ide?
What is object repository? How can we create an object repository in selenium?
Give the example for method overload in webdriver.
What is the difference between getwindowhandles() and getwindowhandle()?
Can we use selenium grid for performance testing?
What is exception test in selenium?
What is a relative xpath?
What exactly is the price of selenium test-suite?
How to pass parameters using testng.xml?