Appium诊断错误解决办法
Mac上安装appium(或者重装后)检测会遇到版本问题,根据报错提示:
[Error: Could not detect Mac OS X Version from sw_vers output: '10.13.4
']
网路查询,很容易找到解决办法:
Terminal will show : /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
vi打开这几个文件,搜索/10.8查到相应行,加入'10.13.4'然后保存;
另外其中有两个文件还需要多加入:
Change From ->
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout;
}
To ->
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim();
}
保存后重新启动appium再次诊断,就会提示everything is good. Bye