Class AndroidDriver<T extends org.openqa.selenium.WebElement>

  • Type Parameters:
    T - the required type of class which implement WebElement. Instances of the defined type will be returned via findElement* and findElements*. Warning (!!!). Allowed types: WebElement RemoteWebElement MobileElement AndroidElement
    All Implemented Interfaces:
    io.appium.java_client.android.AuthenticatesByFinger, io.appium.java_client.android.connection.HasNetworkConnection, io.appium.java_client.android.HasAndroidClipboard, io.appium.java_client.android.HasAndroidDeviceDetails, io.appium.java_client.android.HasSupportedPerformanceDataType, io.appium.java_client.android.ListensToLogcatMessages, io.appium.java_client.android.nativekey.PressesKey, io.appium.java_client.android.PushesFiles, io.appium.java_client.android.StartsActivity, io.appium.java_client.android.SupportsNetworkStateManagement, io.appium.java_client.android.SupportsSpecialEmulatorCommands, io.appium.java_client.battery.HasBattery<io.appium.java_client.android.AndroidBatteryInfo>, io.appium.java_client.clipboard.HasClipboard, io.appium.java_client.ComparesImages, io.appium.java_client.ExecutesDriverScript, io.appium.java_client.ExecutesMethod, io.appium.java_client.FindsByAccessibilityId<T>, io.appium.java_client.FindsByAndroidDataMatcher<T>, io.appium.java_client.FindsByAndroidUIAutomator<T>, io.appium.java_client.FindsByAndroidViewTag<T>, io.appium.java_client.FindsByCustom<T>, io.appium.java_client.FindsByFluentSelector<T>, io.appium.java_client.FindsByImage<T>, io.appium.java_client.HasAppStrings, io.appium.java_client.HasDeviceTime, io.appium.java_client.HasOnScreenKeyboard, io.appium.java_client.HasSessionDetails, io.appium.java_client.HasSettings, io.appium.java_client.HidesKeyboard, io.appium.java_client.InteractsWithApps, io.appium.java_client.InteractsWithFiles, io.appium.java_client.LocksDevice, io.appium.java_client.LogsEvents, io.appium.java_client.MobileDriver<T>, io.appium.java_client.PerformsTouchActions, io.appium.java_client.screenrecording.CanRecordScreen, ReportingDriver, org.openqa.selenium.ContextAware, org.openqa.selenium.HasCapabilities, org.openqa.selenium.html5.LocationContext, org.openqa.selenium.interactions.HasInputDevices, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.internal.FindsByClassName, org.openqa.selenium.internal.FindsByCssSelector, org.openqa.selenium.internal.FindsById, org.openqa.selenium.internal.FindsByLinkText, org.openqa.selenium.internal.FindsByName, org.openqa.selenium.internal.FindsByTagName, org.openqa.selenium.internal.FindsByXPath, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.Rotatable, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebDriver

    public class AndroidDriver<T extends org.openqa.selenium.WebElement>
    extends io.appium.java_client.android.AndroidDriver<T>
    implements ReportingDriver
    Extension of the original AndroidDriver Instead of initializing a new session, it starts it in the TestProject Agent and then reconnects to it.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver

        org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When
      • Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver

        org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
    • Constructor Summary

      Constructors 
      Constructor Description
      AndroidDriver​(java.lang.String token, org.openqa.selenium.Capabilities capabilities)
      Initiates a new session with the Agent using provided token and default URL.
      AndroidDriver​(java.lang.String token, org.openqa.selenium.Capabilities capabilities, java.lang.String projectName)
      Initiates a new session with the Agent using provided token and default URL and Project name.
      AndroidDriver​(java.lang.String token, org.openqa.selenium.Capabilities capabilities, java.lang.String projectName, java.lang.String jobName)
      Initiates a new session with the Agent using provided token and default URL, Project and Job names.
      AndroidDriver​(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.Capabilities capabilities)
      Initiates a new session with the Agent using provided Agent URL and token.
      AndroidDriver​(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.Capabilities capabilities, java.lang.String projectName, java.lang.String jobName, boolean disableReports)
      Initiates a new session with the Agent using provided Agent URL, token, Project and Job names.
      AndroidDriver​(java.net.URL remoteAddress, org.openqa.selenium.Capabilities capabilities)
      Initiates a new session with the Agent using provided Agent URL and default token.
      AndroidDriver​(java.net.URL remoteAddress, org.openqa.selenium.Capabilities capabilities, java.lang.String projectName)
      Initiates a new session with the Agent using provided Agent URL, default token and Project name.
      AndroidDriver​(java.net.URL remoteAddress, org.openqa.selenium.Capabilities capabilities, java.lang.String projectName, java.lang.String jobName)
      Initiates a new session with the Agent using provided Agent URL and default token, Project and Job names.
      AndroidDriver​(org.openqa.selenium.Capabilities capabilities)
      Initiates a new session with the Agent using default token and URL.
      AndroidDriver​(org.openqa.selenium.Capabilities capabilities, boolean disableReports)
      Initiates a new session with the Agent using default token and URL.
      AndroidDriver​(org.openqa.selenium.Capabilities capabilities, java.lang.String projectName)
      Initiates a new session with the Agent using default token and URL with Project name.
      AndroidDriver​(org.openqa.selenium.Capabilities capabilities, java.lang.String projectName, java.lang.String jobName)
      Initiates a new session with the Agent using default token and URL, Project and Job names.
    • Method Summary

      All Methods Instance Methods Concrete Methods Default Methods 
      Modifier and Type Method Description
      default io.appium.java_client.android.HasAndroidSettings allowInvisibleElements​(boolean arg0)  
      default io.appium.java_client.android.HasAndroidSettings configuratorSetActionAcknowledgmentTimeout​(java.time.Duration arg0)  
      default io.appium.java_client.android.HasAndroidSettings configuratorSetKeyInjectionDelay​(java.time.Duration arg0)  
      default io.appium.java_client.android.HasAndroidSettings configuratorSetScrollAcknowledgmentTimeout​(java.time.Duration arg0)  
      default io.appium.java_client.android.HasAndroidSettings configuratorSetWaitForIdleTimeout​(java.time.Duration arg0)  
      default io.appium.java_client.android.HasAndroidSettings configuratorSetWaitForSelectorTimeout​(java.time.Duration arg0)  
      default io.appium.java_client.android.HasAndroidSettings enableNotificationListener​(boolean arg0)  
      org.openqa.selenium.remote.Response execute​(java.lang.String arg0)  
      org.openqa.selenium.remote.Response execute​(java.lang.String arg0, java.util.Map<java.lang.String,​?> arg1)  
      T findElement​(java.lang.String arg0, java.lang.String arg1)  
      T findElement​(org.openqa.selenium.By arg0)  
      T findElementByClassName​(java.lang.String arg0)  
      T findElementByCssSelector​(java.lang.String arg0)  
      T findElementById​(java.lang.String arg0)  
      T findElementByLinkText​(java.lang.String arg0)  
      T findElementByName​(java.lang.String arg0)  
      T findElementByPartialLinkText​(java.lang.String arg0)  
      T findElementByTagName​(java.lang.String arg0)  
      T findElementByXPath​(java.lang.String arg0)  
      default io.appium.java_client.android.HasAndroidSettings ignoreUnimportantViews​(java.lang.Boolean arg0)  
      default io.appium.java_client.android.HasAndroidSettings normalizeTagNames​(boolean arg0)  
      void quit()
      Stops the session with the Agent and cleans up after itself.
      Reporter report()
      Provides access to the reporting functionality and settings.
      default io.appium.java_client.android.HasAndroidSettings setElementResponseAttributes​(java.lang.String arg0)  
      default io.appium.java_client.android.HasAndroidSettings setShouldUseCompactResponses​(boolean arg0)  
      default io.appium.java_client.android.HasAndroidSettings setTrackScrollEvents​(boolean arg0)  
      default io.appium.java_client.android.HasAndroidSettings shutdownOnPowerDisconnect​(boolean arg0)  
      protected void startSession​(org.openqa.selenium.Capabilities capabilities)
      Sets capabilities and sessionId obtained from the Agent when creating the original session.
      java.lang.String toString()  
      • Methods inherited from class io.appium.java_client.android.AndroidDriver

        endTestCoverage, getBatteryInfo, getLogcatClient, openNotifications, toggleLocationServices
      • Methods inherited from class io.appium.java_client.AppiumDriver

        context, findElements, findElements, findElementsByAccessibilityId, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getContext, getContextHandles, getExecuteMethod, getOrientation, getRemoteAddress, getStatus, isBrowser, location, rotate, rotate, rotation, setLocation, substituteMobilePlatform, updateDefaultPlatformName
      • Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver

        builder, close, executeAsyncScript, executeScript, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getFileDetector, getKeyboard, getMouse, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, switchTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.appium.java_client.android.AuthenticatesByFinger

        fingerPrint
      • Methods inherited from interface io.appium.java_client.screenrecording.CanRecordScreen

        startRecordingScreen, startRecordingScreen, stopRecordingScreen, stopRecordingScreen
      • Methods inherited from interface io.appium.java_client.ComparesImages

        findImageOccurrence, findImageOccurrence, findImageOccurrence, findImageOccurrence, getImagesSimilarity, getImagesSimilarity, getImagesSimilarity, getImagesSimilarity, matchImagesFeatures, matchImagesFeatures, matchImagesFeatures, matchImagesFeatures
      • Methods inherited from interface io.appium.java_client.ExecutesDriverScript

        executeDriverScript, executeDriverScript
      • Methods inherited from interface io.appium.java_client.ExecutesMethod

        execute, execute
      • Methods inherited from interface io.appium.java_client.FindsByAccessibilityId

        findElementByAccessibilityId
      • Methods inherited from interface io.appium.java_client.FindsByAndroidDataMatcher

        findElementByAndroidDataMatcher, findElementsByAndroidDataMatcher
      • Methods inherited from interface io.appium.java_client.FindsByAndroidUIAutomator

        findElementByAndroidUIAutomator, findElementsByAndroidUIAutomator
      • Methods inherited from interface io.appium.java_client.FindsByAndroidViewTag

        findElementByAndroidViewTag, findElementsByAndroidViewTag
      • Methods inherited from interface io.appium.java_client.FindsByCustom

        findElementByCustom, findElementsByCustom
      • Methods inherited from interface io.appium.java_client.FindsByFluentSelector

        findElement, findElements
      • Methods inherited from interface io.appium.java_client.FindsByImage

        findElementByImage, findElementsByImage
      • Methods inherited from interface io.appium.java_client.android.HasAndroidClipboard

        setClipboard, setClipboardText
      • Methods inherited from interface io.appium.java_client.android.HasAndroidDeviceDetails

        getDisplayDensity, getSystemBars
      • Methods inherited from interface io.appium.java_client.HasAppStrings

        getAppStringMap, getAppStringMap, getAppStringMap
      • Methods inherited from interface io.appium.java_client.clipboard.HasClipboard

        getClipboard, getClipboardText, setClipboard, setClipboardText
      • Methods inherited from interface io.appium.java_client.HasDeviceTime

        getDeviceTime, getDeviceTime
      • Methods inherited from interface io.appium.java_client.android.connection.HasNetworkConnection

        getConnection, setConnection
      • Methods inherited from interface io.appium.java_client.HasOnScreenKeyboard

        isKeyboardShown
      • Methods inherited from interface io.appium.java_client.HasSessionDetails

        getAllSessionDetails, getAutomationName, getPlatformName, getSessionDetail, getSessionDetails
      • Methods inherited from interface io.appium.java_client.HasSettings

        getSettings, setSetting, setSetting
      • Methods inherited from interface io.appium.java_client.android.HasSupportedPerformanceDataType

        getPerformanceData, getSupportedPerformanceDataTypes
      • Methods inherited from interface io.appium.java_client.HidesKeyboard

        hideKeyboard
      • Methods inherited from interface io.appium.java_client.InteractsWithApps

        activateApp, activateApp, closeApp, installApp, installApp, isAppInstalled, launchApp, queryAppState, removeApp, removeApp, resetApp, runAppInBackground, terminateApp, terminateApp
      • Methods inherited from interface io.appium.java_client.InteractsWithFiles

        pullFile, pullFolder
      • Methods inherited from interface io.appium.java_client.android.ListensToLogcatMessages

        addLogcatConnectionListener, addLogcatDisconnectionListener, addLogcatErrorsListener, addLogcatMessagesListener, removeAllLogcatListeners, startLogcatBroadcast, startLogcatBroadcast, startLogcatBroadcast, stopLogcatBroadcast
      • Methods inherited from interface io.appium.java_client.LocksDevice

        isDeviceLocked, lockDevice, lockDevice, unlockDevice
      • Methods inherited from interface io.appium.java_client.LogsEvents

        getEvents, logEvent
      • Methods inherited from interface io.appium.java_client.PerformsTouchActions

        performMultiTouchAction, performTouchAction
      • Methods inherited from interface io.appium.java_client.android.nativekey.PressesKey

        longPressKey, pressKey
      • Methods inherited from interface io.appium.java_client.android.PushesFiles

        pushFile, pushFile
      • Methods inherited from interface io.appium.java_client.android.StartsActivity

        currentActivity, getCurrentPackage, startActivity
      • Methods inherited from interface io.appium.java_client.android.SupportsNetworkStateManagement

        toggleAirplaneMode, toggleData, toggleWifi
      • Methods inherited from interface io.appium.java_client.android.SupportsSpecialEmulatorCommands

        makeGsmCall, sendSMS, setGsmSignalStrength, setGsmVoice, setNetworkSpeed, setPowerAC, setPowerCapacity
      • Methods inherited from interface org.openqa.selenium.WebDriver

        close, get, getCurrentUrl, getPageSource, getTitle, getWindowHandle, getWindowHandles, manage, navigate, switchTo
    • Constructor Detail

      • AndroidDriver

        public AndroidDriver​(org.openqa.selenium.Capabilities capabilities)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using default token and URL.

        Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.

        Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page

        Creates a new instance based on capabilities.

        Parameters:
        capabilities - take a look at Capabilities
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(org.openqa.selenium.Capabilities capabilities,
                             boolean disableReports)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using default token and URL.

        Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.

        Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page

        Creates a new instance based on capabilities.

        Parameters:
        capabilities - take a look at Capabilities
        disableReports - True to disable automatic reporting of driver commands and tests, otherwise False.
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(org.openqa.selenium.Capabilities capabilities,
                             java.lang.String projectName)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using default token and URL with Project name.

        Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.

        Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page

        Creates a new instance based on capabilities.

        Parameters:
        capabilities - take a look at Capabilities
        projectName - Project name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(org.openqa.selenium.Capabilities capabilities,
                             java.lang.String projectName,
                             java.lang.String jobName)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using default token and URL, Project and Job names.

        Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.

        Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page

        Creates a new instance based on capabilities.

        Parameters:
        capabilities - take a look at Capabilities
        projectName - Project name to report
        jobName - Job name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.lang.String token,
                             org.openqa.selenium.Capabilities capabilities)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided token and default URL.

        Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.

        Creates a new instance based on capabilities.

        Parameters:
        token - Development token that should be obtained from SDK page
        capabilities - take a look at Capabilities
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.lang.String token,
                             org.openqa.selenium.Capabilities capabilities,
                             java.lang.String projectName)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided token and default URL and Project name.

        Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.

        Creates a new instance based on capabilities.

        Parameters:
        token - Development token that should be obtained from SDK page
        capabilities - take a look at Capabilities
        projectName - Project name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.lang.String token,
                             org.openqa.selenium.Capabilities capabilities,
                             java.lang.String projectName,
                             java.lang.String jobName)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided token and default URL, Project and Job names.

        Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.

        Creates a new instance based on capabilities.

        Parameters:
        token - Development token that should be obtained from SDK page
        capabilities - take a look at Capabilities
        projectName - Project name to report
        jobName - Job name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.net.URL remoteAddress,
                             org.openqa.selenium.Capabilities capabilities)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided Agent URL and default token.

        Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page

        Creates a new instance based on capabilities.

        Parameters:
        remoteAddress - Agent API base URL (e.g. http://localhost:8585/)
        capabilities - take a look at Capabilities
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.net.URL remoteAddress,
                             org.openqa.selenium.Capabilities capabilities,
                             java.lang.String projectName)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided Agent URL, default token and Project name.

        Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page

        Creates a new instance based on capabilities.

        Parameters:
        remoteAddress - Agent API base URL (e.g. http://localhost:8585/)
        capabilities - take a look at Capabilities
        projectName - Project name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.net.URL remoteAddress,
                             org.openqa.selenium.Capabilities capabilities,
                             java.lang.String projectName,
                             java.lang.String jobName)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided Agent URL and default token, Project and Job names.

        Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page

        Creates a new instance based on capabilities.

        Parameters:
        remoteAddress - Agent API base URL (e.g. http://localhost:8585/)
        capabilities - take a look at Capabilities
        projectName - Project name to report
        jobName - Job name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.net.URL remoteAddress,
                             java.lang.String token,
                             org.openqa.selenium.Capabilities capabilities)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided Agent URL and token.
        Parameters:
        remoteAddress - Agent API base URL (e.g. http://localhost:8585/)
        token - Development token that should be obtained from SDK page
        capabilities - take a look at Capabilities
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • AndroidDriver

        public AndroidDriver​(java.net.URL remoteAddress,
                             java.lang.String token,
                             org.openqa.selenium.Capabilities capabilities,
                             java.lang.String projectName,
                             java.lang.String jobName,
                             boolean disableReports)
                      throws AgentConnectException,
                             InvalidTokenException,
                             java.net.MalformedURLException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided Agent URL, token, Project and Job names.
        Parameters:
        remoteAddress - Agent API base URL (e.g. http://localhost:8585/)
        token - Development token that should be obtained from SDK page
        capabilities - take a look at Capabilities
        projectName - Project name to report
        jobName - Job name to report
        disableReports - True to disable automatic reporting of driver commands and tests, otherwise False.
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.net.MalformedURLException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
    • Method Detail

      • startSession

        protected void startSession​(org.openqa.selenium.Capabilities capabilities)
        Sets capabilities and sessionId obtained from the Agent when creating the original session.
        Overrides:
        startSession in class io.appium.java_client.AppiumDriver<T extends org.openqa.selenium.WebElement>
      • quit

        public void quit()
        Stops the session with the Agent and cleans up after itself.
        Specified by:
        quit in interface org.openqa.selenium.WebDriver
        Overrides:
        quit in class org.openqa.selenium.remote.RemoteWebDriver
      • ignoreUnimportantViews

        public default io.appium.java_client.android.HasAndroidSettings ignoreUnimportantViews​(java.lang.Boolean arg0)
      • configuratorSetWaitForIdleTimeout

        public default io.appium.java_client.android.HasAndroidSettings configuratorSetWaitForIdleTimeout​(java.time.Duration arg0)
      • configuratorSetWaitForSelectorTimeout

        public default io.appium.java_client.android.HasAndroidSettings configuratorSetWaitForSelectorTimeout​(java.time.Duration arg0)
      • configuratorSetScrollAcknowledgmentTimeout

        public default io.appium.java_client.android.HasAndroidSettings configuratorSetScrollAcknowledgmentTimeout​(java.time.Duration arg0)
      • configuratorSetKeyInjectionDelay

        public default io.appium.java_client.android.HasAndroidSettings configuratorSetKeyInjectionDelay​(java.time.Duration arg0)
      • configuratorSetActionAcknowledgmentTimeout

        public default io.appium.java_client.android.HasAndroidSettings configuratorSetActionAcknowledgmentTimeout​(java.time.Duration arg0)
      • normalizeTagNames

        public default io.appium.java_client.android.HasAndroidSettings normalizeTagNames​(boolean arg0)
      • setShouldUseCompactResponses

        public default io.appium.java_client.android.HasAndroidSettings setShouldUseCompactResponses​(boolean arg0)
      • setElementResponseAttributes

        public default io.appium.java_client.android.HasAndroidSettings setElementResponseAttributes​(java.lang.String arg0)
      • allowInvisibleElements

        public default io.appium.java_client.android.HasAndroidSettings allowInvisibleElements​(boolean arg0)
      • enableNotificationListener

        public default io.appium.java_client.android.HasAndroidSettings enableNotificationListener​(boolean arg0)
      • shutdownOnPowerDisconnect

        public default io.appium.java_client.android.HasAndroidSettings shutdownOnPowerDisconnect​(boolean arg0)
      • setTrackScrollEvents

        public default io.appium.java_client.android.HasAndroidSettings setTrackScrollEvents​(boolean arg0)
      • execute

        public org.openqa.selenium.remote.Response execute​(java.lang.String arg0,
                                                           java.util.Map<java.lang.String,​?> arg1)
        Specified by:
        execute in interface io.appium.java_client.ExecutesMethod
        Overrides:
        execute in class org.openqa.selenium.remote.RemoteWebDriver
      • execute

        public org.openqa.selenium.remote.Response execute​(java.lang.String arg0)
        Specified by:
        execute in interface io.appium.java_client.ExecutesMethod
        Overrides:
        execute in class org.openqa.selenium.remote.RemoteWebDriver
      • findElement

        public T findElement​(org.openqa.selenium.By arg0)
        Specified by:
        findElement in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Specified by:
        findElement in interface org.openqa.selenium.SearchContext
        Specified by:
        findElement in interface org.openqa.selenium.WebDriver
        Overrides:
        findElement in class org.openqa.selenium.remote.RemoteWebDriver
      • findElement

        public T findElement​(java.lang.String arg0,
                             java.lang.String arg1)
        Specified by:
        findElement in interface io.appium.java_client.FindsByFluentSelector<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElement in class org.openqa.selenium.remote.RemoteWebDriver
      • findElementById

        public T findElementById​(java.lang.String arg0)
        Specified by:
        findElementById in interface org.openqa.selenium.internal.FindsById
        Specified by:
        findElementById in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementById in class org.openqa.selenium.remote.RemoteWebDriver
      • findElementByLinkText

        public T findElementByLinkText​(java.lang.String arg0)
                                throws org.openqa.selenium.WebDriverException
        Specified by:
        findElementByLinkText in interface org.openqa.selenium.internal.FindsByLinkText
        Specified by:
        findElementByLinkText in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementByLinkText in class org.openqa.selenium.remote.RemoteWebDriver
        Throws:
        org.openqa.selenium.WebDriverException
      • findElementByPartialLinkText

        public T findElementByPartialLinkText​(java.lang.String arg0)
                                       throws org.openqa.selenium.WebDriverException
        Specified by:
        findElementByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkText
        Specified by:
        findElementByPartialLinkText in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementByPartialLinkText in class org.openqa.selenium.remote.RemoteWebDriver
        Throws:
        org.openqa.selenium.WebDriverException
      • findElementByTagName

        public T findElementByTagName​(java.lang.String arg0)
        Specified by:
        findElementByTagName in interface org.openqa.selenium.internal.FindsByTagName
        Specified by:
        findElementByTagName in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementByTagName in class org.openqa.selenium.remote.RemoteWebDriver
      • findElementByName

        public T findElementByName​(java.lang.String arg0)
        Specified by:
        findElementByName in interface org.openqa.selenium.internal.FindsByName
        Specified by:
        findElementByName in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementByName in class org.openqa.selenium.remote.RemoteWebDriver
      • findElementByClassName

        public T findElementByClassName​(java.lang.String arg0)
        Specified by:
        findElementByClassName in interface org.openqa.selenium.internal.FindsByClassName
        Specified by:
        findElementByClassName in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementByClassName in class org.openqa.selenium.remote.RemoteWebDriver
      • findElementByCssSelector

        public T findElementByCssSelector​(java.lang.String arg0)
                                   throws org.openqa.selenium.WebDriverException
        Specified by:
        findElementByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelector
        Specified by:
        findElementByCssSelector in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementByCssSelector in class org.openqa.selenium.remote.RemoteWebDriver
        Throws:
        org.openqa.selenium.WebDriverException
      • findElementByXPath

        public T findElementByXPath​(java.lang.String arg0)
        Specified by:
        findElementByXPath in interface org.openqa.selenium.internal.FindsByXPath
        Specified by:
        findElementByXPath in interface io.appium.java_client.MobileDriver<T extends org.openqa.selenium.WebElement>
        Overrides:
        findElementByXPath in class org.openqa.selenium.remote.RemoteWebDriver
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.openqa.selenium.remote.RemoteWebDriver