Class AppiumFieldDecorator
- java.lang.Object
-
- io.appium.java_client.pagefactory.AppiumFieldDecorator
-
- All Implemented Interfaces:
org.openqa.selenium.support.pagefactory.FieldDecorator
public class AppiumFieldDecorator extends java.lang.Object implements org.openqa.selenium.support.pagefactory.FieldDecorator
Default decorator for use with PageFactory. Will decorate 1) all of the WebElement fields and 2) List of WebElement that have @AndroidFindBy, @AndroidFindBys, or @iOSFindBy/@iOSFindBys annotation with a proxy that locates the elements using the passed in ElementLocatorFactory. Please pay attention: fields ofWebElement
orRemoteWebElement
to use with this decorator
-
-
Field Summary
Fields Modifier and Type Field Description static java.time.Duration
DEFAULT_WAITING_TIMEOUT
-
Constructor Summary
Constructors Constructor Description AppiumFieldDecorator(org.openqa.selenium.SearchContext context)
AppiumFieldDecorator(org.openqa.selenium.SearchContext context, java.time.Duration duration)
Creates field decorator based onSearchContext
and timeoutduration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
decorate(java.lang.ClassLoader ignored, java.lang.reflect.Field field)
Decorated page objectfield
.
-
-
-
Constructor Detail
-
AppiumFieldDecorator
public AppiumFieldDecorator(org.openqa.selenium.SearchContext context, java.time.Duration duration)
Creates field decorator based onSearchContext
and timeoutduration
.- Parameters:
context
- is an instance ofSearchContext
It may be the instance ofWebDriver
orWebElement
orWidget
or some other user's extension/implementation.duration
- is a desired duration of the waiting for an element presence.
-
AppiumFieldDecorator
public AppiumFieldDecorator(org.openqa.selenium.SearchContext context)
-
-
Method Detail
-
decorate
public java.lang.Object decorate(java.lang.ClassLoader ignored, java.lang.reflect.Field field)
Decorated page objectfield
.- Specified by:
decorate
in interfaceorg.openqa.selenium.support.pagefactory.FieldDecorator
- Parameters:
ignored
- class loader is ignored by current implementationfield
- isField
of page object which is supposed to be decorated.- Returns:
- a field value or null.
-
-