Finds the first IWebElement using the given method.
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
The locating mechanism to use.
Return Value
The first matching IWebElement on the current context.Implements
ISearchContext FindElement(By)Exceptions
Exception | Condition |
---|---|
OpenQA.Selenium NoSuchElementException | If no element matches the criteria. |
See Also