I have an error when trying to launch iOS app by desktop Appium server, i managed to run the test on android device successfully, but failed to do the same for the iOS.
The error is: >
Bad app: >/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/app>ium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be >absolute, or relative to the appium server install dir, or a URL to compressed >file, or a special app name.
My code is:
// Set desired capabilities.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "iOS");
// REAL DEVICE
//capabilities.setCapability("deviceName", "iPhone 6s");
capabilities.setCapability("deviceName", "Testing iPhone6s");
capabilities.setCapability("platformVersion", "11.0.1");
capabilities.setCapability("browserName", "Safari");
capabilities.setCapability("orientation", "PORTRAIT");
capabilities.setCapability("udid", "XXXX");
String apkpath="/Users/testing/Desktop/Mohandisi.ipa";
// capabilities.setCapability(MobileCapabilityType.APP, apkpath);
File app=new File(apkpath);
capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
// Open the app.
driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
I don't know why appium days that the application is bad although i added the full path!
iOS Settings in Appium Server Screen shot
Aucun commentaire:
Enregistrer un commentaire