RemoteWebElementFindElementByClassName Method WebDriver
Finds the first element in the page that matches the CSS Class supplied

Namespace: OpenQA.Selenium.Remote
Assembly: WebDriver (in WebDriver.dll) Version: 3.1.0
Syntax

public IWebElement FindElementByClassName(
	string className
)

Parameters

className
Type: SystemString
CSS class name of the element on the page

Return Value

Type: IWebElement
IWebElement object so that you can interact that object

Implements

IFindsByClassNameFindElementByClassName(String)
Examples

IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
IWebElement elem = driver.FindElementByClassName("classname")
See Also

Reference