Finds a list of elements that match the XPath supplied
Namespace: OpenQA.Selenium.RemoteAssembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
public ReadOnlyCollection<IWebElement> FindElementsByXPath( string xpath )
Parameters
- xpath
- Type:
System String
xpath to element on the page
Return Value
ReadOnlyCollection of IWebElement objects so that you can interact that objectImplements
IFindsByXPath FindElementsByXPath(String)Examples
IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); ReadOnlyCollection<IWebElement> elem = driver.FindElementsByXpath("//tr/td/a")
See Also