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

What are the popular programming languages supported by selenium webdriver to write test cases?

904


How to upload a file in selenium webdriver?

1037


How to perform right click using webdriver?

989


How to pause a test execution for 5 seconds at a specific point?

1014


What is the use of deselect all () method?

995


When do you use selenium grid?

906


What is the use of @listener annotation in testng?

952


Explain using webdriver how you can perform double click?

888


What is Selenese?

1003


How to configure selenium web driver in eclipse?

970


Does the selenium have any limitations?

999


What if you have written your own element locator and how would you test it?

1068


Mention what is the use of x-path?

1031


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

1044


Explain what is datadriven framework and keyword driven?

1054