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 is pom (page object model)?

0 Answers  


How to clear the text in the text box using selenium webdriver?

0 Answers  


Explain me how to execute javascript in selenium?

0 Answers  


What is the wait?

0 Answers  


How to get the number of frames on a page?

0 Answers  






How you build object repository in your project?

0 Answers  


How can it be found if an item is displayed on the screen?

0 Answers  


What are the testing type supported by selenium webdriver?

0 Answers  


Explain how you will login into any site if it is showing any authentication popup for username and password?

0 Answers  


What is the difference between selenium and sikuli?

0 Answers  


What is the alternative to driver.get() method to open an url using selenium webdriver?

0 Answers  


Explain me what could be the cause of selenium webdriver test to fail?

0 Answers  


Categories