Hello, everyone.
So I have this problem. I need to run a test case both on iphone simulator and on ipad simulator.
The problem is that appium its not connecting to my iPad simulator.
So, for iphone, my capabilities are like this:
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
capabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, “1.7.1”);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, “iPhone 6s”);
capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, “10.3”);
capabilities.setCapability(MobileCapabilityType.APP, iOSApp.getAbsolutePath());
For my iPad, is this:
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
capabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, “1.7.1”);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, “iPad Simulator”);
capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, “10.3”);
capabilities.setCapability(MobileCapabilityType.APP, iPadApp.getAbsolutePath());
So, at first, the appium opens iphone, then opens ipad but when it requires to open the app on ipad, it opens it on iphone. Sometimes, like 1 out of 10, it opens app in ipad, but very rarely and I cannot figure out why. Anyone has a solution for this? What capabilities should I use so that ipad will be opened instead of iphone?
Thanks in advance!