public static class By.ByClassName 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 java.lang.String |
className |
private static long |
serialVersionUID |
Constructor and Description |
---|
ByClassName(java.lang.String className) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
containingWord(java.lang.String attribute,
java.lang.String word)
Generates a partial xpath expression that matches an element whose specified attribute
contains the given CSS word.
|
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 className
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 elementprivate java.lang.String containingWord(java.lang.String attribute, java.lang.String word)
attribute
- nameword
- name