我正在使用Appium Desktop(v1.6)在real上运行我的应用程序以检查元素。 当我尝试这样做时,我收到以下错误
[MJSONWP] Encountered internal error running command: Error: Could not determine Xcode version: Could not find path to Xcode by symlinks located in /var/db/xcode_select_link, or /usr/share/xcode-select/xcode_dir_link
at Object.wrappedLogger.errorAndThrow (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/logging.js:63:13)
at getAndCheckXcodeVersion$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/utils.js:52:9)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
这是我在appium中添加的功能。
{
"platformName": "iOS",
"platformVersion": "11.0.3",
"deviceName": "Sumit's iPhone",
"udid": "XXXXXXXXXXXXXX",
"app": "/Users/sumit/Documents//MyApp.ipa",
"automationName": "XCUITest"
}
当我试图在终端上运行命令时,我得到了xCode的版本。
MAC:~ sumit$ xcodebuild -version
Xcode 9.1
Build version 9B55
任何帮助都将不胜感激。谢谢
答案 0 :(得分:1)
Appium服务器1.6 不支持
第一步是尝试最新的appium服务器 1.7.2 beta:
npm uninstall -g appium
npm install -g appium@beta
如果您仍然遇到此问题,请按this检查xcode simlinks
答案 1 :(得分:-1)
决议: - 输入终端: - sudo xcode-select --switch /Applications/Xcode.app