How to fix error quot;Could not detect Mac OS X Version from sw_vers output: #39;10.12 #39;quot; from Appium(如何修复错误“无法从 sw_vers 输出检测 Mac OS X 版本:10.12来自Appium)
问题描述
我安装了 appium-1.5.3.dmg 但是当我点击听诊器按钮时,Appium 显示错误:
I installed appium-1.5.3.dmg But when I click the stethoscope button the Appium is show error :
✔ Xcode is installed at: /Library/Developer/CommandLineTools
[Error: Could not detect Mac OS X Version from sw_vers output: '10.12
']
谢谢!
推荐答案
它对我有用.
你可以通过这个命令配置文件:
You can config file by this command:
- grep -rl "无法从 sw_vers 输出中检测到 Mac OS X 版本:"/Applications/Appium.app/
终端会显示:/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
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
使用命令 vim 并配置每个文件.
Use command vim and config each file.
vim /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js
配置文件:
更改自 ->
Change From ->
案例10:_arr = ['10.8', '10.9', '10.10', '10.11'];_i = 0;
到->
案例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
配置文件:
更改自 ->
Change From ->
试试{stdout = (await exec('sw_vers', ['-productVersion'])).stdout;}
到 ->
试试{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
配置文件:
更改自 ->
Change From ->
案例10:_arr = ['10.8', '10.9', '10.10', '10.11'];_i = 0;
到->
案例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
配置文件:
更改自 ->
Change From ->
试试{stdout = (await exec('sw_vers', ['-productVersion'])).stdout;}
到->
试试{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;}}
点击启动听诊器按钮
这篇关于如何修复错误“无法从 sw_vers 输出检测 Mac OS X 版本:'10.12'"来自Appium的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何修复错误“无法从 sw_vers 输出检测 Mac OS X 版


- Android - 拆分 Drawable 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- android 4中的android RadioButton问题 2022-01-01