我是靠谱客的博主 喜悦向日葵,最近开发中收集的这篇文章主要介绍appium:Could not detect Mac OS X version,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

使用appium-doctor检查出Could not detect Mac OS X version,原因是appium还没兼容10.10以上的系统。

但是只需要在/usr/local/lib/node_modules/appium/lib/doctor/ios.js改一下相应的配置就可以了。

 

IOSChecker.prototype.getMacOSXVersion = function (cb) {
  exec("sw_vers -productVersion", function (err, stdout) {
    if (err === null) {
      if (stdout.match('10.8') !== null) {
        this.osVersion = '10.8';
        cb(null, "Mac OS X 10.8 is installed.");
      } else if (stdout.match('10.9') !== null) {
        this.osVersion = '10.9';
        cb(null, "Mac OS X 10.9 is installed.");
      } else if ((stdout.match('10.10') !== null) || (stdout.match('10.10.1') !== null)) {
        this.osVersion = '10.10';
        cb(null, "Mac OS X 10.10 is installed.");
      } else if((stdout.match('10.11') !== null) || (stdout.match('10.11.1') !== null)) {
        this.osVersion = '10.11';
        cb(null, "Mac OS X 10.11 is installed.");
      }else {
        this.log.fail("Could not detect Mac OS X Version", cb);
      }
    } else {
      this.log.fail("Unknown SW Version Command: " + err, cb);
    }
  }.bind(this));
};


 

 

 

 

最后

以上就是喜悦向日葵为你收集整理的appium:Could not detect Mac OS X version的全部内容,希望文章能够帮你解决appium:Could not detect Mac OS X version所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部