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 happen if you mix both implicit wait and explicit wait in a selenium script?
how to handle staleelementreferenceexception?
Tell me why to choose python over java in selenium?
What are the different types of locators in Selenium?
When should I use selenium grid?
List some of the test types that are supported by selenium.
When should I use Selenium IDE?
What is parameterization in testng? How to pass parameters using testng.xml?
Mention in what ways you can customize testng report?
How selenium grid hub keeps in touch with rc slave machine?
What is the purpose of deselecting all() method?
What are the different types of wait statements in selenium webdriver? Or how do you achieve synchronization in webdriver?
How can we handle window ui elements and window pop ups using selenium?
What is the hybrid framework?
Which browsers can selenium ide be run in?