I\'m new to both C# and Selenium WebDriver.
I know how to select/click on an option in a drop-down list, but I\'ve a problem before that. Since the drop-down list i
You can use selenium.Support
to use the SelectElement
class, this class have a property "Options" that is what you are looking for, I created an extension method to convert your web element to a select element
public static SelectElement AsDropDown(this IWebElement webElement)
{
return new SelectElement(webElement);
}
then you could use it like this
var elem = driver.FindElement(By.XPath("//select[@name='time_zone']"));
var options = elem.AsDropDown().Options