How do you get all the values from Drop Down list?
Answer Posted / rupesh
WebElement sel = myD.findElement(By.name("dropdown_name"));
List<WebElement> lists = sel.findElements(By.tagName("option"));
for(WebElement element: lists)
{
String var2 = tdElement.getText();
System.out.println(var2);
}
Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
How to change the url on a webpage using selenium web driver?
What are the different components of the selenium?
What are the challenges with selenium ide?
When to use autoit?
How can we create an object repository in selenium?
What is the alternate way to click on login button?
What is the difference between “/” and “XPath //”?
How to handle the AJAX popup window?
List some of the common automation frameworks.
Describe a framework. List some of the common automation frameworks.
How can we create object repository in selenium?
When should one use selenium grid?
Describe the purpose of xpath.
Explain how you can insert a break point in selenium ide?
What is intellij?