public class DefaultElementLocator extends java.lang.Object implements ElementLocator
PageFactory
and understands the
annotations FindBy
and CacheLookup
.Constructor and Description |
---|
DefaultElementLocator(SearchContext searchContext,
java.lang.reflect.Field field)
Creates a new element locator.
|
Modifier and Type | Method and Description |
---|---|
WebElement |
findElement()
Find the element.
|
java.util.List<WebElement> |
findElements()
Find the element list.
|
public DefaultElementLocator(SearchContext searchContext, java.lang.reflect.Field field)
searchContext
- The context to use when finding the elementfield
- The field on the Page Object that will hold the located valuepublic WebElement findElement()
findElement
in interface ElementLocator
public java.util.List<WebElement> findElements()
findElements
in interface ElementLocator