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

How would you test your element locator?

934


What are the regular expression patterns available in selenium?

844


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

919


When to use accessors in selenium?

1016


What is the difference between “/” and “//” in xpath?

1099


What are the annotations used in testng?

934


What are the verification points available in selenium?

990


List out the names of programming languages, browsers and operating systems that are supported by selenium.

792


Explain what are the junits annotation linked with selenium?

911


How to handle frame in webdriver?

858


What is the framework?

824


What is same origin policy? How you can avoid same origin policy?

768


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

819


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

880


Mention when to use autoit?

880