public class Annotations
extends org.openqa.selenium.support.pagefactory.AbstractAnnotations
Annotations class. The
difference is that, this class wraps all locator annotations like
FindBy of selenium with an additional proxy, which is responsible for
resolving spring placeholders.| Constructor and Description |
|---|
Annotations(Field field,
VaniContext vaniContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertValidAnnotations() |
org.openqa.selenium.By |
buildBy()
Looks for one of
FindBy,
FindBys or
FindAll field annotations. |
protected org.openqa.selenium.By |
buildByFromDefault() |
protected Field |
getField() |
boolean |
isLookupCached() |
public Annotations(Field field, VaniContext vaniContext)
field - expected to be an element in a Page Objectpublic boolean isLookupCached()
isLookupCached in class org.openqa.selenium.support.pagefactory.AbstractAnnotationspublic org.openqa.selenium.By buildBy()
FindBy,
FindBys or
FindAll field annotations. In case no
annotaions provided for field, uses field name as 'id' or 'name'.buildBy in class org.openqa.selenium.support.pagefactory.AbstractAnnotationsIllegalArgumentException - when more than one annotation on a field providedprotected Field getField()
protected org.openqa.selenium.By buildByFromDefault()
protected void assertValidAnnotations()
Copyright © 2016. All rights reserved.