Selenium WebDriver Tutorial #17 – How to Handle Dropdown in Selenium-Part 1

In this Selenium Webdriver Tutorial, we will learn How to Handle Dropdown in Selenium WebDriver.

In this part-1 of handling dropdown tutorials, we will learn how to use the following methods for selecting values in dropdown. Selenium provides Select class which has these methods to work with single select dropdowns.

✅ selectByIndex(int index) – Select the option at the given index.

✅ selectByValue(java.lang.String value) – Select all options that have a value matching the argument.

✅ selectByVisibleText(java.lang.String text) – Select all options that display text matching the argument.