Finds a list of elements that match the class name supplied
Namespace: OpenQA.Selenium.RemoteAssembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
public ReadOnlyCollection<IWebElement> FindElementsByClassName( string className )
Parameters
- className
- Type:
System String
CSS class Name on the element
Return Value
ReadOnlyCollection of IWebElement object so that you can interact with those objectsImplements
IFindsByClassName FindElementsByClassName(String)Examples
IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); ReadOnlyCollection<IWebElement> elem = driver.FindElementsByClassName("classname")
See Also