Class 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 Detail

      • DEFAULT_ANNOTATION_METHOD_ARGUMENTS

        protected static final java.lang.Class<?>[] DEFAULT_ANNOTATION_METHOD_ARGUMENTS
      • platform

        protected final java.lang.String platform
      • automation

        protected final java.lang.String automation
    • Constructor Detail

      • AppiumByBuilder

        protected AppiumByBuilder​(java.lang.String platform,
                                  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 extends AnnotatedElement
      • 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) into By class used by webdriver to locate elements.
        Specified by:
        buildBy in class org.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 class org.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()