Appium之Doctor报错:iOS Could not detect Mac OS X Version from sw_vers output: '10.12.5 '的解决方法
来源:互联网 发布:网络优化培训班 编辑:程序博客网 时间:2024/05/21 14:47
背景
亲测验证
Mac 系统为10.12.5
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.5']; _i = 0;
注意退出时,:wq
退出并保存。
步骤二、
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.5']) {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.5]; _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.5']) {if (stdout.indexOf(v) === 0) { return v; }}
阅读全文
1 0
- Appium之Doctor报错:iOS Could not detect Mac OS X Version from sw_vers output: '10.12.5 '的解决方法
- Appium Doctor iOS 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
- 自动化测试 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
- Android Studio报错Could not read cache value from “...” 的解决方法
- 安装PIL报错Could not find a version that satisfies the requirement PIL (from versions: )的解决办法
- CVS报错:could not find desired version的解决办法
- 用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)
- 用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from 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 10.7 Lion下import wx报错“no matching architecture in universal wrapper”的解决方法
- Mac OS X is not supported with software virtualization解决方法
- appium 连接Android真机出现:could not launch appium inspector的解决方法
- InnoDB存储引擎
- 关于url提交请求时传递数组参数的用法
- 在本地环境搭建maven的nexus私服,但是有些jar下载不了或下载很慢,解决办法
- MongoDB-配置翻译
- 中小企业云化转型解经营之困 中企动力三大利好引潮流之风
- Appium之Doctor报错:iOS Could not detect Mac OS X Version from sw_vers output: '10.12.5 '的解决方法
- iOS关于时间的处理
- 画廊效果的广告栏
- 浅谈性能测试、压力测试和负载测试
- 简单说一下jquery中 tmpl 的用法
- socket编程TCP通信
- iOS把已经存在的Xcode项目上传到Github上
- python 3 requests模块
- a链接绑定了 onclick 事件,单击事件中是history.go 单击两次才能后退的原因