Class AppiumByBuilder
- java.lang.Object
-
- org.openqa.selenium.support.pagefactory.AbstractAnnotations
-
- io.appium.java_client.pagefactory.bys.builder.AppiumByBuilder
-
- Direct Known Subclasses:
DefaultElementByBuilder
public abstract class AppiumByBuilder extends org.openqa.selenium.support.pagefactory.AbstractAnnotations
It is the basic handler of Appium-specific page object annotations About the Page Object design pattern please read these documents: - https://code.google.com/p/selenium/wiki/PageObjects - https://code.google.com/p/selenium/wiki/PageFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotatedElementContainer
annotatedElementContainer
protected java.lang.String
automation
protected static java.lang.Class<?>[]
DEFAULT_ANNOTATION_METHOD_ARGUMENTS
protected java.lang.String
platform
-
Constructor Summary
Constructors Modifier Constructor Description protected
AppiumByBuilder(java.lang.String platform, java.lang.String automation)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
assertValidAnnotations()
abstract org.openqa.selenium.By
buildBy()
Defines how to transform given object (field, class, etc) intoBy
class used by webdriver to locate elements.protected abstract org.openqa.selenium.By
buildDefaultBy()
protected abstract org.openqa.selenium.By
buildMobileNativeBy()
protected static org.openqa.selenium.By
createBy(java.lang.annotation.Annotation[] annotations, HowToUseSelectors howToUseLocators)
protected boolean
isAndroid()
protected boolean
isIOS()
protected boolean
isIOSXcuit()
abstract boolean
isLookupCached()
Defines whether or not given element should be returned from cache on further calls.protected boolean
isTvOS()
protected boolean
isWindows()
void
setAnnotated(java.lang.reflect.AnnotatedElement annotated)
This method should be used for the setting up of AnnotatedElement instances before the building of By-locator strategies.
-
-
-
Field Detail
-
DEFAULT_ANNOTATION_METHOD_ARGUMENTS
protected static final java.lang.Class<?>[] DEFAULT_ANNOTATION_METHOD_ARGUMENTS
-
annotatedElementContainer
protected final AnnotatedElementContainer annotatedElementContainer
-
platform
protected final java.lang.String platform
-
automation
protected final java.lang.String automation
-
-
Method Detail
-
createBy
@Nullable protected static org.openqa.selenium.By createBy(java.lang.annotation.Annotation[] annotations, HowToUseSelectors howToUseLocators)
-
setAnnotated
public void setAnnotated(java.lang.reflect.AnnotatedElement annotated)
This method should be used for the setting up of AnnotatedElement instances before the building of By-locator strategies.- Parameters:
annotated
- is an instance of class which type extendsAnnotatedElement
-
isAndroid
protected boolean isAndroid()
-
isIOS
protected boolean isIOS()
-
isTvOS
protected boolean isTvOS()
-
isIOSXcuit
protected boolean isIOSXcuit()
-
isWindows
protected boolean isWindows()
-
buildBy
public abstract org.openqa.selenium.By buildBy()
Defines how to transform given object (field, class, etc) intoBy
class used by webdriver to locate elements.- Specified by:
buildBy
in classorg.openqa.selenium.support.pagefactory.AbstractAnnotations
-
isLookupCached
public abstract boolean isLookupCached()
Defines whether or not given element should be returned from cache on further calls.- Specified by:
isLookupCached
in classorg.openqa.selenium.support.pagefactory.AbstractAnnotations
-
buildDefaultBy
protected abstract org.openqa.selenium.By buildDefaultBy()
-
buildMobileNativeBy
protected abstract org.openqa.selenium.By buildMobileNativeBy()
-
assertValidAnnotations
protected abstract void assertValidAnnotations()
-
-