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 ReadOnlyCollection<IWebElement> FindElementsById( string id )
Parameters
- id
- Type:
System String
ID of the Element
Return Value
ReadOnlyCollection of Elements that match the object so that you can interact that objectImplements
IFindsById FindElementsById(String)Examples
IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); ReadOnlyCollection<IWebElement> elem = driver.FindElementsById("id")
See Also