Reputation: 169
Hi I am using device farm, appium, testng framework for iOS automation. I need an info regarding how to know the iOS device version in the device pool. My scenario to test the devices with version less than 9.3 to use appium test and greater than 9.3 to use XCUITest. Could you please suggest any possibility for this scenario.
Thanks in Advance Rijo
Upvotes: 1
Views: 294
Reputation: 53
You may use some thing like this to differentiate during runtime, this can be used for both android and ios and switched during runtime :'
driver = MobileDriverUtil.getAndroidDriverForDeviceFarm();
if (!driver.getCapabilities().getCapability("platformVersion").toString().startsWith("4")) {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2);
driver.getCapabilities().merge(capabilities);
} else {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.APPIUM);
driver.getCapabilities().merge(capabilities);
}
Upvotes: 1
Reputation: 749
I work for the AWS Device Farm team.
From what I understood you are looking to chose a testing framework during runtime and based on the OS version.
Device farm can individually run both Appium and XCUI Tests. The easy way to look at this is:
You chose the device pool on device farm which is a collection of devices. This device pool can be separated in 9.3 and above types and runs can be scheduled accordingly.
As you control the devices on which tests should be run choosing the test type becomes easier.
Hope that helps.
Upvotes: 1