我正在尝试在终端上运行Appium 1.6.3,这样我就可以在iOS模拟器上运行Appium了。在过去,我能够在终端上启动Appium。自从我将mac OS升级到10.12.3后,当我尝试运行它时总是会出现以下错误:
-bash: appium: command not found
当我尝试运行appium-doctor时,我通常会得到以下诊断:
info AppiumDoctor Appium Doctor v.1.3.0
info AppiumDoctor ### Diagnostic starting ###
info AppiumDoctor ✔ The Node.js binary was found at: /usr/local/bin/node
info AppiumDoctor ✔ Node version is 6.9.4
info AppiumDoctor ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
WARN AppiumDoctor ✖ Xcode Command Line Tools are NOT installed!
WARN AppiumDoctor ✖ DevToolsSecurity is NOT enabled!
info AppiumDoctor ✔ The Authorization DB is set up properly.
info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage
info AppiumDoctor ✔ HOME is set to: /Users/jakerushing
info AppiumDoctor ✔ ANDROID_HOME is set to: /Users/jakerushing/Library/Android/sdk
info AppiumDoctor ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
info AppiumDoctor ✔ adb exists at: /Users/jakerushing/Library/Android/sdk/platform-tools/adb
info AppiumDoctor ✔ android exists at: /Users/jakerushing/Library/Android/sdk/tools/android
info AppiumDoctor ✔ emulator exists at: /Users/jakerushing/Library/Android/sdk/tools/emulator
info AppiumDoctor ✔ Bin directory of $JAVA_HOME is set
info AppiumDoctor ### Diagnostic completed, 2 fixes needed. ###
当我尝试运行xcode-select --install
时,我收到的错误是已经安装了工具,并且已经启用了DevToolsSecurity。我尝试卸载XCode命令工具并重新安装,但没有解决问题。我试图解决这个问题几天,我找不到这些问题的任何答案。我对这个问题已经结束了。
非常感谢任何输入。
答案 0 :(得分:0)
在你的日志中:
WARN AppiumDoctor ✖ Xcode Command Line Tools are NOT installed!
WARN AppiumDoctor ✖ DevToolsSecurity is NOT enabled!
解决方法:运行命令波纹管,然后尝试重新启动Appium医生
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
DevToolsSecurity -enable
答案 1 :(得分:0)
所以我找到了一个解决我的主要问题的方法,当我输入appium时,appium没有运行
我在网上发现了这篇博文,并阅读了相关说明。之后,我能够再次运行appium命令!
https://solidgeargroup.com/automated-test-for-ios-with-appium-set-up-the-environment-2
无论是谁写的这个都为我节省了很多时间,我本可以浪费时间寻找解决方案。你是一个圣人。
但是,我仍然无法检测到DevToolsSecurity。当我输入/ usr / sbin / DevToolsSecurity -enable时,它表示已经启用了Developer模式,但是当我运行appium-doctor或authorize-ios时,它们都会返回以下内容:
Error: Command 'DevToolsSecurity' not found. Is it installed?
ERR! AuthorizeIOS at ChildProcess.<anonymous> (/Users/jakerushing/.node/lib/node_modules/authorize-ios/node_modules/teen_process/build/lib/teen_process.js:71:14)
答案 2 :(得分:0)
在终端中运行以下命令:
null