public static class By.ByXPath extends By implements java.io.Serializable
By.ByClassName, By.ByCssSelector, By.ById, By.ByLinkText, By.ByName, By.ByPartialLinkText, By.ByTagName, By.ByXPath
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private java.lang.String |
xpathExpression |
Constructor and Description |
---|
ByXPath(java.lang.String xpathExpression) |
Modifier and Type | Method and Description |
---|---|
WebElement |
findElement(SearchContext context)
Find a single element.
|
java.util.List<WebElement> |
findElements(SearchContext context)
Find many elements.
|
java.lang.String |
toString() |
private static final long serialVersionUID
private final java.lang.String xpathExpression
public java.util.List<WebElement> findElements(SearchContext context)
By
findElements
in class By
context
- A context to use to find the elementpublic WebElement findElement(SearchContext context)
By
findElement
in class By
context
- A context to use to find the element