Class AppiumFieldDecorator
java.lang.Object
io.appium.java_client.pagefactory.AppiumFieldDecorator
- All Implemented Interfaces:
org.openqa.selenium.support.pagefactory.FieldDecorator
public class AppiumFieldDecorator
extends 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 of
WebElement or RemoteWebElement
to use with this decorator-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAppiumFieldDecorator(org.openqa.selenium.SearchContext context) AppiumFieldDecorator(org.openqa.selenium.SearchContext context, Duration duration) Creates field decorator based onSearchContextand timeoutduration. -
Method Summary
Modifier and TypeMethodDescriptiondecorate(ClassLoader ignored, Field field) Decorated page objectfield.
-
Field Details
-
DEFAULT_WAITING_TIMEOUT
-
-
Constructor Details
-
AppiumFieldDecorator
Creates field decorator based onSearchContextand timeoutduration.- Parameters:
context- is an instance ofSearchContextIt may be the instance ofWebDriverorWebElementorWidgetor 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 Details
-
decorate
Decorated page objectfield.- Specified by:
decoratein interfaceorg.openqa.selenium.support.pagefactory.FieldDecorator- Parameters:
ignored- class loader is ignored by current implementationfield- isFieldof page object which is supposed to be decorated.- Returns:
- a field value or null.
-