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

What kind of mouse actions can be performed in selenium?

0 Answers  


how to Handle dropdown?

2 Answers   Cryptopy Technologies,


Have you created any framework?

0 Answers  


Using web driver how you can store a value which is text box?

0 Answers  


Write a code snippet to launch firefox browser in webdriver.

0 Answers  






List some of the operating systems that are supported by selenium webdriver.

0 Answers  


How is driver.close()command different from driver.quit command?

0 Answers  


What is object repository in selenium webdriver?

0 Answers  


What is the meaning of assertion in selenium and what are the types of assertion?

0 Answers  


List some advantages of test automation?

0 Answers  


What are some of the advantages of selenium grid?

0 Answers  


What You Know About Selenium Grid?

0 Answers  


Categories