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