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
How you can use “submit” a form using selenium?
How to scroll down a page using javascript in selenium?
List the different types of drivers in webdriver.
What are the different ways in which selenium ide can be opened?
What are the types of listeners in testng?
How to write in a text box using Selenium?
Tell me how do perform drag and drop using selenium webdriver?
Tell me what kind of mouse actions can be performed in selenium?
Please explain what are the different types of locators in selenium?
What test can selenium perform?
How can we find the value of different attributes like name, class, value of an element?
What’s the difference between borland silk evaluation and selenium?
What is a node in selenium grid?
How are selenium ide, webdriver and selenium rc different from each other?
What is junit annotations and what are different types of annotations which are useful?