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

How will you use selenium to upload a file?

0 Answers  


Write the code to double click an element in selenium?

0 Answers  


What are the uses of findelement() and findelements()?

0 Answers  


Tell me can we use selenium rc for tests driving on two different browsers on one operating system without selenium grid?

0 Answers  


Tell me how can we maximize browser window in selenium?

0 Answers  






What are junit annotations?

0 Answers  


What are the challenges and limitations of selenium webdriver?

0 Answers  


How can we handle pop-ups in rc?

0 Answers  


Enlist the components of selenium.

0 Answers  


Have you created any framework?

0 Answers  


What are the different types of locators in Selenium?

0 Answers   MCN Solutions,


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

0 Answers  


Categories