Class IosCapability

java.lang.Object
core.uiCore.driverProperties.capabilities.IosCapability

public class IosCapability
extends Object
Author:
ehsan.matean
  • Field Details

    • capabilities

      public org.openqa.selenium.remote.DesiredCapabilities capabilities
    • APP_DIR_PATH

      public static String APP_DIR_PATH
    • APP_NAME

      public static String APP_NAME
    • IS_HYBRID_APP

      public static String IS_HYBRID_APP
    • CHROME_VERSION

      public static String CHROME_VERSION
    • simulatorList

      public List<String> simulatorList
    • WDA_LOCAL_PORT

      public static int WDA_LOCAL_PORT
  • Constructor Details

    • IosCapability

      public IosCapability()
  • Method Details

    • withCapability

      public IosCapability withCapability​(org.openqa.selenium.remote.DesiredCapabilities Capabilities)
    • getCapability

      public org.openqa.selenium.remote.DesiredCapabilities getCapability()
    • withDevice

      public IosCapability withDevice​(String device)
      device: property name from property file. eg. device1, device2
      Parameters:
      device -
      Returns:
    • getAppPath

      public String getAppPath()
    • withIosCapability

      public IosCapability withIosCapability()
      sets ios capabilities values are from maven or properties file maven has higher priority than properties
      Returns:
    • setiOSCapabilties

      public org.openqa.selenium.remote.DesiredCapabilities setiOSCapabilties()
      set capabilties with prefix ios.capabilties. eg. ios.capabilties.fullReset="false iterates through all property values with such prefix And adds them to android desired capabilities
      Returns:
    • setSingleSignIn

      public void setSingleSignIn()
      runs subsequent tests without restarting the app removes the need to sign in on every test if tests fail, it will restart the app
    • isRealDeviceConnected

      public boolean isRealDeviceConnected()
      if adb device contains emulator, Then its an emulator otherwise, its a connected real device
      Parameters:
      devices -
      Returns:
    • getIosDeviceList

      public static List<String> getIosDeviceList()
      gets the list of android devices including real devices + emulators require idevice installed: brew install ideviceinstaller
      Returns:
    • setSimulator

      public void setSimulator()
      sets ios device number of devices must be equal or greater than number of threads for parallel run
    • setRealDevices

      public void setRealDevices()
      sets real device
    • setIosDevice

      public void setIosDevice()
      sets device by following strategy: if device is connected, selects device if emulator is not specified with "withDevice1() or with Device2() function, select device 1 by default from properties else select emulator from properties specified in panel config page
    • setPort

      public void setPort​(String deviceName)
      if device has port assigned, use assigned port else generate new port number
      Parameters:
      deviceName -
    • setChromeDriver

      public void setChromeDriver()
      download chrome driver if hybrid app is enabled if Version is LATEST, download latest driver unless set in config