完美解决 Could not detect Mac OS X Version from sw_vers output: '10.12.3
2017-07-12 17:20
513 查看
如果发现appium在苹果电脑上,报上面的错误,是因为现在的版本不兼容,可以用下面的方法解决
到下面的路径下
vim /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js
修改case10为下面
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
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
把try方法修改为下面
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim();
} catch (err) {
throw new Error(`Could not detect Mac OS X Version: ${err}`);
}
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/node_modules/appium-support/build/lib/system.js
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js
修改case10为下面
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
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
把try方法修改为下面
try {
stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim();
} catch (err) {
throw new Error(`Could not detect Mac OS X Version: ${err}`);
}
for (let v of ['10.8', '10.9', '10.10', '10.11', '10.12']) {
if (stdout.indexOf(v) === 0) { return v; }
}
再次执行的时候,通过验证了
相关文章推荐
- 自动化测试 appium Could not detect Mac OS X Version from sw_vers output: '10.12.3 ' 异常处理
- 【Appium】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 '的解决方法
- 【已解决】osx下运行appium doctor提示[Error: Could not detect Mac OS X Version from sw_vers output: '10.13.2 ']
- 真正的 ERROR: could not open required DirectShow codec drvc.bundle/contents/MacOS/drvc 的 解决 办法 Ubuntu9.10
- Windows Intellij环境下Gradle的 “Could not determine Java version from ‘9.0.1’”的解决方式
- QT解决could not resolve sdk path for 'macosx10.8'
- Could not resolve SDK path for 'macosx10.8' 的解决
- Windows Intellij环境下Gradle的 “Could not determine Java version from ‘9.0.1’”的解决方式
- 安装PIL报错Could not find a version that satisfies the requirement PIL (from versions: )的解决办法
- MacOS 10.12:Could not resolve SDK Path for ‘macosx’ 的问题解决
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- 解决Virtual Box 下安装Mac OS X时出现的“hfs: could not initializc summary table for OSX Base System ”问题
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
- PANIC: Could not open:my_avd.ini完美解决
- Could not find the required version of the Java(TM)2 Runtime Environment in '(null)' 解决办法
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法 .
- Could not copy properties from source to target异常解决