我在Mac Yosemite 10.10.5版本上成功设置了Appium。我有Xcode 7.2.1和xcode 6.1.1。我也安装了ideviceInstaller。
我在Mac上连接了我的iOS设备并启动了appium服务器。当试图运行量角器测试时,我收到以下错误。
使用的手机: Iphone 6 plus:版本:9.3.1 iPhone 5c:版本9.2.1 Appium:1.5.2
日志:
BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version, count.
[BaseDriver] Session created with session id: 47c8905c-afc5-4786-a218-01e6425f3aea
[debug] [iOS] Not auto-detecting udid.
[debug] [iOS] Creating iDevice object with udid 58ae05dd744e1e1329bc4ffb4c8599bddd6f0378
[debug] [iOS] Checking for presence of SafariLauncher at '/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app'
[debug] [iOS] SafariLauncher does not exist
[debug] [iOS] SafariLauncher not found, building...
[iOS] Cleaning SafariLauncher
[debug] [iOS] Cleaning SafariLauncher for iphoneos8.1
[iOS] Finished cleaning SafariLauncher
[iOS] Updating config for Safari Launcher
[iOS] Building SafariLauncher
[debug] [iOS] Building SafariLauncher for iphoneos8.1
[iOS] Error: Command 'xcodebuild -sdk iphoneos8.1 -xcconfig /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher/build.xcconfig' exited with code 65
at ChildProcess.<anonymous> (lib/teen_process.js:65:19)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)
{ [Error: Command 'xcodebuild -sdk iphoneos8.1 -xcconfig /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher/build.xcconfig' exited with code 65]
stdout: 'Build settings from command line:\n SDKROOT = iphoneos8.1\n\nBuild settings from configuration file \'/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher/build.xcconfig\':\n BUNDLE_ID = com.bytearc.SafariLauncher\n IDENTITY_CODE = \n IDENTITY_NAME = iPhone Developer\n\n=== BUILD TARGET SafariLauncher OF PROJECT SafariLauncher WITH THE DEFAULT CONFIGURATION (Release) ===\n\nCheck dependencies\nCode Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.\nCodeSign error: code signing is required for product type \'Application\' in SDK \'iOS 8.1\'\n\n',
stderr: '** BUILD FAILED **\n\n\nThe following build commands failed:\n\tCheck dependencies\n(1 failure)\n',
code: 65 }
[iOS] Error: Command 'xcodebuild -sdk iphoneos8.1 -xcconfig /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher/build.xcconfig' exited with code 65
at ChildProcess.<anonymous> (lib/teen_process.js:65:19)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)
{ [Error: Command 'xcodebuild -sdk iphoneos8.1 -xcconfig /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher/build.xcconfig' exited with code 65]
stdout: 'Build settings from command line:\n SDKROOT = iphoneos8.1\n\nBuild settings from configuration file \'/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher/build.xcconfig\':\n BUNDLE_ID = com.bytearc.SafariLauncher\n IDENTITY_CODE = \n IDENTITY_NAME = iPhone Developer\n\n=== BUILD TARGET SafariLauncher OF PROJECT SafariLauncher WITH THE DEFAULT CONFIGURATION (Release) ===\n\nCheck dependencies\nCode Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.\nCodeSign error: code signing is required for product type \'Application\' in SDK \'iOS 8.1\'\n\n',
stderr: '** BUILD FAILED **\n\n\nThe following build commands failed:\n\tCheck dependencies\n(1 failure)\n',
code: 65 }
[iOS] Bad app: '/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-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.
[HTTP] <-- POST /wd/hub/session 500 2678 ms - 410
[MJSONWP] Encountered internal error running command: Error: Bad app: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-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.
at IosDriver.configureApp$ (lib/driver.js:250:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
---------------------------------------------------------------------------------
Protractor logs:
[14:57:11] I/hosted - Using the selenium server at http://localhost:4723/wd/hub
[14:57:11] I/launcher - Running 1 instances of WebDriver
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:27
super(opt_error);
^
WebDriverError: An unknown server-side error occurred while processing the command. Original error: Bad app: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-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.
at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:27:5)
at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:580:13)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:64:13
at Promise.invokeCallback_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14)
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/pro[14:57:13] E/launcher - Process exited with error code 1
----------------------------------------------------------------------------------
Protractor Appium Conf file
capabilities: {
browserName: 'safari',
'appium-version': '1.5.2',
platformName: 'iOS',
platformVersion: '9.3.1',
deviceName: 'iPhone 6+',
udid: '********************'
},
specs: [
'../appiumTests/AppiumSmokeTest.js'
],