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 to download a file in selenium webdriver?
where do u maintain all your test cases in manual not in selenium
How to handle ajax calls in selenium webdriver?
How to click on a hyperlink using selenium webdriver?
How do perform drag and drop using selenium webdriver?
What is the difference between setspeed() and sleep() methods?
I am not able to use "style" attribute to locate element with ie browser?
How to locate a link using its text in selenium?
Mention different exceptions you had in selenium web driver?
What are some commonly encountered exceptions in selenium?
How to developer selenium test cases?
What are the advantages and disadvantages of selenium ?
How to insert a start point in selenium ide?
Can we enter text without using sendkeys()?
What are the different methods to refresh a web page in webdriver?