ByXPath Method WebDriver
Gets a mechanism to find elements by an XPath query. When searching within a WebElement using xpath be aware that WebDriver follows standard conventions: a search prefixed with "//" will search the entire document, not just the children of this current node. Use ".//" to limit your search to the children of this WebElement.

Namespace: OpenQA.Selenium
Assembly: WebDriver (in WebDriver.dll) Version: 3.1.0

public static By XPath(
	string xpathToFind


Type: SystemString
The XPath query to use.

Return Value

Type: By
A By object the driver can use to find the elements.
See Also