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 / p sureshchowdary

Select dropdown=new Select(d.findElement(By.id("month")));
List<WebElement> list=dropdown.getOptions();
for(WebElement we:list) {
System.out.println(we.getText());
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention in what ways you can customize testng report?

1220


Are you familiar with selenium? If yes, what is it?

1336


Mention why do you need session handling while working with selenium?

1038


Why should testers opt for selenium and not qtp?

1013


What are the different types of drivers available on Webdriver ?

990


How to locate a link using its text in selenium?

1034


Tell us what are the two modes of views in selenium ide?

928


What is object repository? How can we create an object repository in selenium?

1258


Give the example for method overload in webdriver.

1116


What is the difference between getwindowhandles() and getwindowhandle()?

1071


Can we use selenium grid for performance testing?

919


What is exception test in selenium?

1141


What is a relative xpath?

1184


What exactly is the price of selenium test-suite?

920


How to pass parameters using testng.xml?

927