1、 找到appium的安装目录下的adb.js文件,windows版本的目录如下:E:\Appium\node_modules\appium\node_modules\appium-adb\lib
2、 打开adb.js,手动修改该文件下的内容:
在1035行开始这段代码后面加上:outlines.shift();
 
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

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2021-09-07
  • 2021-05-25
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
猜你喜欢
  • 2021-04-23
  • 2021-04-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
相关资源
相似解决方案