Failed to start WebDriverAgent due to xcodebuild failure: xcodebuild error with code 65
I am trying to run appium scripts with the setting below:
Appium version : 1.6.4
Xcode : 8.3.2
Mac : 10.12.4
iPhone : 10.3.1
Below is the code I am using to launch the Safari browser on a real device iPhone.
desCapabilities = new DesiredCapabilities();
desCapabilities.setCapability("platformName","iOS");
desCapabilities.setCapability("deviceName", "Ananda iPhone");
desCapabilities.setCapability("platformVersion", "10.3.1");
desCapabilities.setCapability("app", "com.apple.mobilesafari");
desCapabilities.setCapability("udid", "******");
iOSDriver = new IOSDriver<MobileElement>(new URL("http://" + nodeUrl + ":" + nodeUrlPort + "/wd/hub"), desCapabilities);
I am getting an error and please find the logs below:
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:374:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:109:7)
source to share
Following the steps below, I launched the Safari browser on a real iOS device using Appium.
-
We need to install WebDriverAgent on Mac using Terminal.
xcodebuild build test -project / usr / local / lib / node_modules / appium / node_modules / appium-xcuitest-driver / WebDriverAgent / WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id = -configuration Debugging
-
Run below command to open WebDriverAgent with Xcode.
open / usr / local / lib / node_modules / appium / node_modules / appium-xcuitest-driver / WebDriverAgent / WebDriverAgent.xcodeproj
-
In Xcode, check the "Automatically manage subscription" checkbox for WebDriverAgent and WebDriverAgentLib.
-
Run your Xcode project.
-
After a successful build, the WebDriverAgent application will be installed on the iPhone.
-
Finally, run the Selenium code to launch Safari Browser.
source to share