zoukankan      html  css  js  c++  java
  • appium 启动android 9 失败

    报错  selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. (Original error: Could not extract PIDs from ps output. PIDS: [], Procs: ["ps: uiautomator"])

    解决方法:

    打开appium安装目录,进入..Appium ode_modulesappium ode_modulesappium-adblib,打开adb.js

    添加了如下一行,再次打开appium启动android 9 就可成功了

    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(" ");
    outlines.shift();//添加了此行
    _.each(outlines, function (outline) {
    if (outline.indexOf(name) !== -1) {
    procs.push(outline);
    }
    });
    if (procs.length < 1) {
    logger.debug("No matching processes found");
    return cb(null, []);
    }

  • 相关阅读:
    云计算-MapReduce
    云计算--hbase shell
    云计算--hdfs dfs 命令
    云计算--MPI
    jQuery 效果
    jQuery 效果
    JQuery效果隐藏/显示
    JQuery教程
    六级啊啊啊
    jQuery 安装
  • 原文地址:https://www.cnblogs.com/zhoulw/p/10177595.html
Copyright © 2011-2022 走看看