How to select a value from a drop-down?



How to select a value from a drop-down?..

Answer / dileep kumar

by using select keyword we can select a value from dropdown box
select select = new select (driver.findelement(by.xpath(" xpath")));
select.selectbyindex(2);
select.selectbyvalue(2);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

Tell me do you know a way to refresh browser by using selenium?

0 Answers  


How to check if an element is visible on the web page?

0 Answers  


What programming languages are you able to use in selenium rc?

0 Answers  


Tell us how you can use recovery scenario with selenium?

0 Answers  


What happens if I run this command. Driver.get(“www.softwaretestingmaterial.com”) ;

0 Answers  






Which webdriver implementation claims to be the fastest?

0 Answers  


How to check which option in the dropdown is selected?

0 Answers  


How to export the tests from selenium ide to selenium rc in different languages?

0 Answers  


where do u maintain all your test cases in manual not in selenium

0 Answers  


What is selenium? What are the different components of Selenium?

1 Answers  


How to handle alerts in selenium?

0 Answers  


What are the test types supported by selenium?

0 Answers  


Categories