Class IosCapability
java.lang.Object
core.uiCore.driverProperties.capabilities.IosCapability
- Author:
- ehsan.matean
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.remote.DesiredCapabilitiesgets the list of android devices including real devices + emulators require idevice installed: brew install ideviceinstallerbooleanif adb device contains emulator, Then its an emulator otherwise, its a connected real devicevoiddownload chrome driver if hybrid app is enabled if Version is LATEST, download latest driver unless set in configorg.openqa.selenium.remote.DesiredCapabilitiesset capabilties with prefix ios.capabilties.voidsets 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 pagevoidif device has port assigned, use assigned port else generate new port numbervoidsets real devicevoidsets ios device number of devices must be equal or greater than number of threads for parallel runvoidruns subsequent tests without restarting the app removes the need to sign in on every test if tests fail, it will restart the appwithCapability(org.openqa.selenium.remote.DesiredCapabilities Capabilities) withDevice(String device) device: property name from property file.sets ios capabilities values are from maven or properties file maven has higher priority than properties
-
Field Details
-
capabilities
public org.openqa.selenium.remote.DesiredCapabilities capabilities -
APP_DIR_PATH
-
APP_NAME
-
IS_HYBRID_APP
-
CHROME_VERSION
-
simulatorList
-
WDA_LOCAL_PORT
public static int WDA_LOCAL_PORT
-
-
Constructor Details
-
IosCapability
public IosCapability()
-
-
Method Details
-
withCapability
-
getCapability
public org.openqa.selenium.remote.DesiredCapabilities getCapability() -
withDevice
device: property name from property file. eg. device1, device2- Parameters:
device-- Returns:
-
getAppPath
-
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
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
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
-