Finds the first element in the page that matches the CSS Class supplied
Namespace: OpenQA.Selenium.RemoteAssembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
public IWebElement FindElementByClassName( string className )
Parameters
- className
- Type:
System String
className of the
Return Value
IWebElement object so that you can interact that objectImplements
IFindsByClassName FindElementByClassName(String)Examples
IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); IWebElement elem = driver.FindElementByClassName("classname")
See Also