解决Android 7.0系统的手机无法执行appium脚本的问题

mac2022-06-30  88

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

转载于:https://www.cnblogs.com/51QA/p/6929706.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)