How do you get all the values from Drop Down list?
Answer Posted / raam
----------------------------------------------
Select cel=new Select(driver.findElement(By.id("name"))
cel.selectByVisibleText("state")
---------------------------------------
instead of selectByVisibleText can use-
selectByindex()
getoptions()---used to store all options inside drop down
| Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
What are the open-source frameworks supported by selenium webdriver?
Explain me how to handle alerts in selenium webdriver?
How can we find the value of different attributes like name, class, value of an element?
What are the important selenium ide commands or selenese commands?
What is the difference between the commit and verify commands?
How can you find if an element is displayed on the screen?
Tell me what is a node in selenium grid?
What is group test in testng?
What happen if you mix both implicit wait and explicit wait in a selenium script?
What are the testing types that can be supported by selenium?
Explain how to assert text of webpage using selenium 2.0?
How to find the xpath of web table elements.in chrome or internet explorer.or without using fire bug.?
What kinds of tests can Selenium support?
Explain xpath.
How do you identify an object using selenium?