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

How you can use “submit” a form using selenium?

979


How to scroll down a page using javascript in selenium?

920


List the different types of drivers in webdriver.

928


What are the different ways in which selenium ide can be opened?

875


What are the types of listeners in testng?

1507


How to write in a text box using Selenium?

990


Tell me how do perform drag and drop using selenium webdriver?

936


Tell me what kind of mouse actions can be performed in selenium?

923


Please explain what are the different types of locators in selenium?

915


What test can selenium perform?

1047


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

934


What’s the difference between borland silk evaluation and selenium?

937


What is a node in selenium grid?

1006


How are selenium ide, webdriver and selenium rc different from each other?

938


What is junit annotations and what are different types of annotations which are useful?

975