Posted

2 minutes read

In order to select a dropdown value with Selenium WebDriver you have to create a Select (in C# it’s called SelectElement) element and not use the default WebElements.


import org.openqa.selenium.support.ui.Select;

Use our previous post to locate elements with Selenium WebDriver.


Select dropdown = new Select(driver.findElement(By.id("identifier")));

Let’s consider the following dropdown element for our example:

See more details








Thanks for reading. I hope you learned something interesting about React!
If you found this article useful, please share it with others. Don’t forget to subscribe to get notified for the upcoming articles.