我安装了appium-1.5.3.dmg但是当我点击听诊器按钮时,Appium显示错误:
✔ Xcode is installed at: /Library/Developer/CommandLineTools
[Error: Could not detect Mac OS X Version from sw_vers output: '10.12
']
谢谢!
答案 0 :(得分:30)
这对我有用。
您可以通过此命令配置文件:
终端将显示: /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/lib/system.js /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
使用命令vim并配置每个文件。
vim /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js
配置文件:
更改自 - >
case 10:
_arr = ['10.8', '10.9', '10.10', '10.11'];
_i = 0;
收件人 - >
case 10:
_arr = ['10.8', '10.9', '10.10', '10.11','10.12'];
_i = 0;
vim /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/lib/system.js
配置文件:
更改自 - >
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout;
}
To - >
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim();
}
更改自 - >
for (let v of ['10.8', '10.9', '10.10', '10.11']) {
if (stdout.indexOf(v) === 0) { return v; }
}
收件人 - >
for (let v of ['10.8', '10.9', '10.10', '10.11','10.12']) {
if (stdout.indexOf(v) === 0) { return v; }
}
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js
配置文件:
更改自 - >
case 10:
_arr = ['10.8', '10.9', '10.10', '10.11'];
_i = 0;
收件人 - >
case 10:
_arr = ['10.8', '10.9', '10.10', '10.11','10.12'];
_i = 0;
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
配置文件:
更改自 - >
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout;
}
收件人 - >
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim();
}
更改自 - >
for (let v of ['10.8', '10.9', '10.10', '10.11']) {
if (stdout.indexOf(v) === 0) { return v; }
}
收件人 - >
for (let v of ['10.8', '10.9', '10.10', '10.11','10.12']) {
if (stdout.indexOf(v) === 0) { return v; }
}
点击启动听诊器按钮
答案 1 :(得分:0)
I went through the above steps even though I saw that it's been fixed by appium already.
Just run:
npm install appium-doctor -g
to update appium-doctor itself, then run:
appium-doctor
again to see it work.