Finds the first element in the page that matches the By object
Namespace: OpenQA.Selenium.RemoteAssembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
public IWebElement FindElement( By by )
Parameters
- by
- Type: OpenQA.Selenium By
By mechanism to find the object
Return Value
IWebElement object so that you can interact with that objectImplements
ISearchContext FindElement(By)Examples
IWebDriver driver = new InternetExplorerDriver(); IWebElement elem = driver.FindElement(By.Name("q"));
See Also