Interview Questions

Selenium WebDriver - How do you click on a menu item in a drop down menu?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - How do you click on a menu item in a drop down menu?

If that menu has been created by using select tag then we can use the methods selectByValue() or selectByIndex() or selectByVisibleText(). These are the methods of the Select class.
If the menu has not been created by using the select tag then we can simply find the xpath of that element and click on that to select.

(Continued on next question...)

Other Interview Questions