public class Annotations extends AbstractAnnotations
| Modifier and Type | Field and Description |
|---|---|
private java.lang.reflect.Field |
field |
| Constructor and Description |
|---|
Annotations(java.lang.reflect.Field field) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertValidAnnotations() |
org.openqa.selenium.By |
buildBy()
Defines how to transform given object (field, class, etc)
into
By class used by webdriver to locate elements. |
protected org.openqa.selenium.By |
buildByFromDefault() |
protected java.lang.reflect.Field |
getField() |
boolean |
isLookupCached()
Defines whether or not given element
should be returned from cache on further calls.
|
buildByFromFindBy, buildByFromFindBys, buildByFromLongFindBy, buildByFromShortFindBy, buildBysFromFindByOneOfpublic Annotations(java.lang.reflect.Field field)
field - expected to be an element in a Page Objectpublic boolean isLookupCached()
isLookupCached in class AbstractAnnotationspublic org.openqa.selenium.By buildBy()
By class used by webdriver to locate elements.
Looks for one of FindBy,
FindBys or
FindAll field annotations. In case
no annotaions provided for field, uses field name as 'id' or 'name'.buildBy in class AbstractAnnotationsjava.lang.IllegalArgumentException - when more than one annotation on a field providedprotected java.lang.reflect.Field getField()
protected org.openqa.selenium.By buildByFromDefault()
protected void assertValidAnnotations()