public class DefaultElementLocator extends Object implements ElementLocator
PageFactory
and understands the
annotations FindBy
and CacheLookup
.Constructor and Description |
---|
DefaultElementLocator(org.openqa.selenium.SearchContext searchContext,
AbstractAnnotations annotations)
Use this constructor in order to process custom annotaions.
|
DefaultElementLocator(org.openqa.selenium.SearchContext searchContext,
Field field)
Creates a new element locator.
|
Modifier and Type | Method and Description |
---|---|
org.openqa.selenium.WebElement |
findElement()
Find the element.
|
List<org.openqa.selenium.WebElement> |
findElements()
Find the element list.
|
String |
toString() |
public DefaultElementLocator(org.openqa.selenium.SearchContext searchContext, Field field)
searchContext
- The context to use when finding the elementfield
- The field on the Page Object that will hold the located valuepublic DefaultElementLocator(org.openqa.selenium.SearchContext searchContext, AbstractAnnotations annotations)
searchContext
- The context to use when finding the elementannotations
- AbstractAnnotations class implementationpublic org.openqa.selenium.WebElement findElement()
findElement
in interface ElementLocator
public List<org.openqa.selenium.WebElement> findElements()
findElements
in interface ElementLocator
Copyright © 2016. All rights reserved.