[Solved] Is there a way to select an option from dropdown other than using ‘Select’ class in Selenium?


Yes. The other way is, click on the dropdown menu and select the option from the dropdown using click method as below:

WebElement ele = driver.findElement(By.xpath("<Xpath of dropdown element>"));     // To find the dropdown web element
List<WebElement> options = driver.findElements(By.xpath("<Xpath of dropdown Options"));    // To find the dropdown options
ele.click();      // To click on the dropdown element
options.get(<index>).click();      //To click on the option..

solved Is there a way to select an option from dropdown other than using ‘Select’ class in Selenium?