Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the open-source frameworks supported by selenium webdriver?

1039


Explain me how to handle alerts in selenium webdriver?

863


How can we find the value of different attributes like name, class, value of an element?

931


What are the important selenium ide commands or selenese commands?

967


What is the difference between the commit and verify commands?

1047


How can you find if an element is displayed on the screen?

934


Tell me what is a node in selenium grid?

1033


What is group test in testng?

1023


What happen if you mix both implicit wait and explicit wait in a selenium script?

963


What are the testing types that can be supported by selenium?

1017


Explain how to assert text of webpage using selenium 2.0?

877


How to find the xpath of web table elements.in chrome or internet explorer.or without using fire bug.?

1597


What kinds of tests can Selenium support?

997


Explain xpath.

967


How do you identify an object using selenium?

1000