Can we automate iOS native app in real device without code compilation through Xcode?
created
Nov '15
last reply
Jul '18
- 5
replies
- 3.7k
views
- 6
users
Can we automate iOS native app in real device without code compilation through Xcode?
check .app/.ipa file is build with developer sign and debug enabled app.
if above condition satisfied then below code works fine
File dir = new File(ā<<.app/.ipa location>>ā);
File app = new File(dir, āapp name.app/.ipaā);
AppiumDriver driver;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("autoLaunch", true);
capabilities.setCapability(CapabilityType.PLATFORM, "MACā);
capabilities.setCapability(CapabilityType.VERSION, ā<>ā);
capabilities.setCapability("deviceName", ādevice nameā);
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("udid", āUDID of deviceā);
capabilities.setCapability("bundleId", āapp bundle idā);
capabilities.setCapability("showIOSLog", true);
capabilities.setCapability("app", app.getAbsolutePath());
driver = new IOSDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
Note:native app without code compilation through Xcode only be tested in real device