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 / rupesh

WebElement sel = myD.findElement(By.name("dropdown_name"));
List<WebElement> lists = sel.findElements(By.tagName("option"));
for(WebElement element: lists)
{
String var2 = tdElement.getText();
System.out.println(var2);
}

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you build object repository in your project?

909


What are the important features of selenium ide?

934


Explain what does @test(invocationcount=?) And @test(threadpoolsize=?) Indicate.

4201


Explain what is the difference between borland silk and selenium?

877


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

946


I am not able to use "style" attribute to locate element with ie browser?

848


Tell me how to verify tooltip text using selenium?

822


What is the selenese command to show the value of a variable in the log file?

913


What is the use of deselect all () method?

923


How can we clear a text written in a textbox?

952


What are the different types of frameworks?

870


How do you upload a file using selenium webdriver?

3457


How many test cases you have automated per day?

860


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

972


Can we use selenium grid for performance testing?

805