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
What is selenium rc?
How to do file upload in selenium?
Do you know how to mouse hover an element in selenium?
What is selenese and what are the types of selenese?
Explain how you can use recovery scenario with selenium?
Give ide's main parts and components?
what is mutation testing, Difference between system and End to End testing,Give examples of bug having high priority but low severity except spelling mistakes and logo symbol.
What are startpoints and breakpoints in selenium?
What is intellij?
What is the difference between @factory and @data provider annotation?
How do you identify an object using selenium?
What is the difference between driver.close() and driver.quit command?
How do you upload a file using selenium webdriver?
What are the technical limitations while using selenium rc?
where do u maintain all your test cases in manual not in selenium