Appium Doctor iOS Could not detect Mac OS X Version from sw_vers output: '10.12 '解决方法
来源:互联网 发布:c语言fabs函数确定精读 编辑:程序博客网 时间:2024/05/21 08:53
Appium Doctor iOS Could not detect Mac OS X Version from sw_vers output: '10.12.3 ' 解决方法
本人亲测验证,本人Mac 系统为10.12.3 ,Appium版本为:appium-1.5.3.dmg
4 步骤解决问题:
步骤一、
vi /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.3'];
_i = 0;
步骤二、
vi /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/lib/system.js
(1)修改:
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout;
}
改为:
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim();
}
(2)修改:
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.3']) {
if (stdout.indexOf(v) === 0) { return v; }
}
步骤三、
vi /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.3'];
_i = 0;
步骤四、
vi /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
(1)修改:
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout;
}
改为:
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim();
}
(2)修改:
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.3']) {
if (stdout.indexOf(v) === 0) { return v; }
}
参考文章:http://stackoverflow.com/questions/40129794/how-to-fix-error-could-not-detect-mac-os-x-version-from-sw-vers-output-10-12
- Appium Doctor iOS Could not detect Mac OS X Version from sw_vers output: '10.12 '解决方法
- Appium之Doctor报错:iOS Could not detect Mac OS X Version from sw_vers output: '10.12.5 '的解决方法
- 【Appium】Could not detect Mac OS X Version from sw_vers output: '10.12
- 检查appium环境报错Could not detect Mac OS X Version from sw_vers output: '10.12'
- 自动化测试 appium Could not detect Mac OS X Version from sw_vers output: '10.12.3 ' 异常处理
- 完美解决 Could not detect Mac OS X Version from sw_vers output: '10.12.3
- appium:Could not detect Mac OS X version
- Could not update Activiti database schema: unknown version from database: ‘5.x.x.x‘
- Mac OS X System Version
- How to Transfer Audio Output from Mac OS X to Ubuntu via a Network?
- Mac OS X is not supported with software virtualization解决方法
- Mac下appium-doctor提示错误汇总
- IOS与Mac OS X
- Mac OS X 下搭建Robot Framework+Appium环境
- VMware 11 + Mac os x 10.10 + Appium环境搭建
- ubuntu kylin16.04 ERROR: Rosdep experienced an error: Could not detect OS
- Mac OS X 下终端系统命令丢失提示 command not found 解决方法
- appium 连接Android真机出现:could not launch appium inspector的解决方法
- mapper映射器中if标签的应用
- LeetCode 104. Maximum Depth of Binary Tree
- 算法20:两个排序数组merge后的中值
- yum安装的PHP卸载
- R on Spark
- Appium Doctor iOS Could not detect Mac OS X Version from sw_vers output: '10.12 '解决方法
- NP2
- JavaScript笔记-->基本语法
- SQL容易出错写法及解决
- 安装 Xcode_8.1.xip(踩坑)
- 百度地图添加复杂的自定义覆盖物
- Spark MLlib之KMeans
- 根目录下的子目录和文件作用
- 关于Ionic select在部分安卓下微信(QQ)点击无反应的解决方法