Class VerisoftMobileDriver

java.lang.Object
co.verisoft.fw.selenium.drivers.VerisoftDriver
co.verisoft.fw.selenium.drivers.VerisoftMobileDriver
All Implemented Interfaces:
io.appium.java_client.battery.HasBattery, io.appium.java_client.CanRememberExtensionPresence, io.appium.java_client.ExecutesMethod, io.appium.java_client.HasAppStrings, io.appium.java_client.HasDeviceTime, io.appium.java_client.HasOnScreenKeyboard, io.appium.java_client.HasSettings, io.appium.java_client.HidesKeyboard, io.appium.java_client.InteractsWithApps, io.appium.java_client.LocksDevice, io.appium.java_client.PerformsTouchActions, io.appium.java_client.PullsFiles, io.appium.java_client.PushesFiles, io.appium.java_client.remote.SupportsContextSwitching, io.appium.java_client.remote.SupportsRotation, io.appium.java_client.screenrecording.CanRecordScreen, org.openqa.selenium.ContextAware, org.openqa.selenium.HasCapabilities, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.PrintsPage, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator, org.openqa.selenium.WebDriver, org.openqa.selenium.WrapsDriver

public class VerisoftMobileDriver extends VerisoftDriver implements io.appium.java_client.remote.SupportsContextSwitching, io.appium.java_client.remote.SupportsRotation, io.appium.java_client.HidesKeyboard, io.appium.java_client.HasDeviceTime, io.appium.java_client.PullsFiles, io.appium.java_client.InteractsWithApps, io.appium.java_client.HasAppStrings, io.appium.java_client.PerformsTouchActions, io.appium.java_client.HasOnScreenKeyboard, io.appium.java_client.LocksDevice, io.appium.java_client.PushesFiles, io.appium.java_client.screenrecording.CanRecordScreen, io.appium.java_client.battery.HasBattery, io.appium.java_client.HasSettings
VeriSoft mobile driver. A driver for mobile application. This driver refers to Android driver and ios driver only. All other drivers are not supported by VerisoftMobileDriver at present time. The driver supports both local and remote driver:-

VeriSoft mobile driver is a concrete class which implements all the interfaces AppiumDriver and DefaultGenericMobileDriver.

VeriSoftMobileDriver implements WebDriver behavior, and in addition adds functionality. The main functionality which is currently supported:
2. Extended logging
3. All available events are registered. See events in the "See Also" section
4. WebDriver is wrapped with EventFiringDecorator. See in the "See Also" section


The driver is instanciated by specifying the relevant DesiredCapabilities, and if the driver is a remote driver, specifying remote url. All of VeriSoft's ctors expectes at least a DesiredCapabilities object.

Since:
1.9.6
Author:
David Yehezkel, Nir Gallner @ www.VeriSoft.co
  • Constructor Details

    • VerisoftMobileDriver

      public VerisoftMobileDriver(org.openqa.selenium.Capabilities capabilities)
    • VerisoftMobileDriver

      public VerisoftMobileDriver(URL remoteAddress, org.openqa.selenium.Capabilities capabilities)
    • VerisoftMobileDriver

      public VerisoftMobileDriver(org.openqa.selenium.remote.HttpCommandExecutor commandExecutor, org.openqa.selenium.Capabilities capabilities)
    • VerisoftMobileDriver

      public VerisoftMobileDriver(org.openqa.selenium.WebDriver otherDriver)
    • VerisoftMobileDriver

      public VerisoftMobileDriver(URL url, org.openqa.selenium.Capabilities capabilities, Map<String,String> customHeaders)
  • Method Details

    • getBatteryInfo

      public io.appium.java_client.battery.BatteryInfo getBatteryInfo()
      Specified by:
      getBatteryInfo in interface io.appium.java_client.battery.HasBattery
    • execute

      public org.openqa.selenium.remote.Response execute(String s, Map<String,?> map)
      Specified by:
      execute in interface io.appium.java_client.ExecutesMethod
    • execute

      public org.openqa.selenium.remote.Response execute(String s)
      Specified by:
      execute in interface io.appium.java_client.ExecutesMethod
    • rotation

      public org.openqa.selenium.DeviceRotation rotation()
      Specified by:
      rotation in interface io.appium.java_client.remote.SupportsRotation
    • rotate

      public void rotate(org.openqa.selenium.DeviceRotation rotation)
      Specified by:
      rotate in interface io.appium.java_client.remote.SupportsRotation
    • rotate

      public void rotate(org.openqa.selenium.ScreenOrientation orientation)
      Specified by:
      rotate in interface io.appium.java_client.remote.SupportsRotation
    • getOrientation

      public org.openqa.selenium.ScreenOrientation getOrientation()
      Specified by:
      getOrientation in interface io.appium.java_client.remote.SupportsRotation
    • startRecordingScreen

      public <T extends io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions> String startRecordingScreen(T options)
      Specified by:
      startRecordingScreen in interface io.appium.java_client.screenrecording.CanRecordScreen
    • startRecordingScreen

      public String startRecordingScreen()
      Specified by:
      startRecordingScreen in interface io.appium.java_client.screenrecording.CanRecordScreen
    • stopRecordingScreen

      public <T extends io.appium.java_client.screenrecording.BaseStopScreenRecordingOptions> String stopRecordingScreen(T options)
      Specified by:
      stopRecordingScreen in interface io.appium.java_client.screenrecording.CanRecordScreen
    • stopRecordingScreen

      public String stopRecordingScreen()
      Specified by:
      stopRecordingScreen in interface io.appium.java_client.screenrecording.CanRecordScreen
    • getAppStringMap

      public Map<String,String> getAppStringMap()
      Specified by:
      getAppStringMap in interface io.appium.java_client.HasAppStrings
    • getAppStringMap

      public Map<String,String> getAppStringMap(String language)
      Specified by:
      getAppStringMap in interface io.appium.java_client.HasAppStrings
    • getAppStringMap

      public Map<String,String> getAppStringMap(String language, String stringFile)
      Specified by:
      getAppStringMap in interface io.appium.java_client.HasAppStrings
    • getDeviceTime

      public String getDeviceTime(String format)
      Specified by:
      getDeviceTime in interface io.appium.java_client.HasDeviceTime
    • getDeviceTime

      public String getDeviceTime()
      Specified by:
      getDeviceTime in interface io.appium.java_client.HasDeviceTime
    • isKeyboardShown

      public boolean isKeyboardShown()
      Specified by:
      isKeyboardShown in interface io.appium.java_client.HasOnScreenKeyboard
    • hideKeyboard

      public void hideKeyboard()
      Specified by:
      hideKeyboard in interface io.appium.java_client.HidesKeyboard
    • installApp

      public void installApp(String appPath)
      Specified by:
      installApp in interface io.appium.java_client.InteractsWithApps
    • installApp

      public void installApp(String appPath, @Nullable @Nullable io.appium.java_client.appmanagement.BaseInstallApplicationOptions options)
      Specified by:
      installApp in interface io.appium.java_client.InteractsWithApps
    • isAppInstalled

      public boolean isAppInstalled(String bundleId)
      Specified by:
      isAppInstalled in interface io.appium.java_client.InteractsWithApps
    • runAppInBackground

      public void runAppInBackground(Duration duration)
      Specified by:
      runAppInBackground in interface io.appium.java_client.InteractsWithApps
    • removeApp

      public boolean removeApp(String bundleId)
      Specified by:
      removeApp in interface io.appium.java_client.InteractsWithApps
    • removeApp

      public boolean removeApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseRemoveApplicationOptions options)
      Specified by:
      removeApp in interface io.appium.java_client.InteractsWithApps
    • activateApp

      public void activateApp(String bundleId)
      Specified by:
      activateApp in interface io.appium.java_client.InteractsWithApps
    • activateApp

      public void activateApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseActivateApplicationOptions options)
      Specified by:
      activateApp in interface io.appium.java_client.InteractsWithApps
    • queryAppState

      public io.appium.java_client.appmanagement.ApplicationState queryAppState(String bundleId)
      Specified by:
      queryAppState in interface io.appium.java_client.InteractsWithApps
    • terminateApp

      public boolean terminateApp(String bundleId)
      Specified by:
      terminateApp in interface io.appium.java_client.InteractsWithApps
    • terminateApp

      public boolean terminateApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseTerminateApplicationOptions options)
      Specified by:
      terminateApp in interface io.appium.java_client.InteractsWithApps
    • lockDevice

      public void lockDevice()
      Specified by:
      lockDevice in interface io.appium.java_client.LocksDevice
    • lockDevice

      public void lockDevice(Duration duration)
      Specified by:
      lockDevice in interface io.appium.java_client.LocksDevice
    • unlockDevice

      public void unlockDevice()
      Specified by:
      unlockDevice in interface io.appium.java_client.LocksDevice
    • isDeviceLocked

      public boolean isDeviceLocked()
      Specified by:
      isDeviceLocked in interface io.appium.java_client.LocksDevice
    • performTouchAction

      public io.appium.java_client.TouchAction performTouchAction(io.appium.java_client.TouchAction touchAction)
      Specified by:
      performTouchAction in interface io.appium.java_client.PerformsTouchActions
    • performMultiTouchAction

      public io.appium.java_client.MultiTouchAction performMultiTouchAction(io.appium.java_client.MultiTouchAction multiAction)
      Specified by:
      performMultiTouchAction in interface io.appium.java_client.PerformsTouchActions
    • pullFile

      public byte[] pullFile(String remotePath)
      Specified by:
      pullFile in interface io.appium.java_client.PullsFiles
    • pullFolder

      public byte[] pullFolder(String remotePath)
      Specified by:
      pullFolder in interface io.appium.java_client.PullsFiles
    • pushFile

      public void pushFile(String remotePath, byte[] base64Data)
      Specified by:
      pushFile in interface io.appium.java_client.PushesFiles
    • pushFile

      public void pushFile(String remotePath, File file) throws IOException
      Specified by:
      pushFile in interface io.appium.java_client.PushesFiles
      Throws:
      IOException
    • context

      public org.openqa.selenium.WebDriver context(String name)
      Specified by:
      context in interface org.openqa.selenium.ContextAware
      Specified by:
      context in interface io.appium.java_client.remote.SupportsContextSwitching
    • getContextHandles

      public Set<String> getContextHandles()
      Specified by:
      getContextHandles in interface org.openqa.selenium.ContextAware
      Specified by:
      getContextHandles in interface io.appium.java_client.remote.SupportsContextSwitching
    • getContext

      @Nullable public @Nullable String getContext()
      Specified by:
      getContext in interface org.openqa.selenium.ContextAware
      Specified by:
      getContext in interface io.appium.java_client.remote.SupportsContextSwitching
    • getAndroidDriver

      public io.appium.java_client.android.AndroidDriver getAndroidDriver()
    • getIOSDriver

      public io.appium.java_client.ios.IOSDriver getIOSDriver()
    • assertExtensionExists

      public io.appium.java_client.ExecutesMethod assertExtensionExists(String s)
      Specified by:
      assertExtensionExists in interface io.appium.java_client.CanRememberExtensionPresence
    • markExtensionAbsence

      public io.appium.java_client.ExecutesMethod markExtensionAbsence(String s)
      Specified by:
      markExtensionAbsence in interface io.appium.java_client.CanRememberExtensionPresence