1. 找到appium的安装目录下的adb.js文件。

2. 打开adb.js,手动修改该文件下的内容:

  Adb.prototype.getPIDsByName=function(name,cb){

    logger.debug("Getting all processes with '"+name+"'")

    this.shell("ps'"+name+"'",function(err,stdout){

      if(err) return cb(err);

        stdout = stdout.trim();

        var procs = [];

        var outlines = stdout.split("\n");

        outlines.shift();//在该处添加此行代码

  })

}

3. 重启appium。

相关文章:

  • 2021-12-21
  • 2021-06-14
  • 2021-10-07
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-21
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案