报错截图



因为appium服务用的是1.4.x版本,使用的是 uiatumator1.0在android7.0得不到支持,所以获取PIDS得到空。

解决办法

找到Appium安装目录下node_modules\appium\node_modules\appium-adb\lib\adb.js文件



修改,在var outlines = stdout.split("\n")这行代码下方增加outlines.shift();注意有分号,然后重启appium即可。



然后重现运行我们的代码即可

from appium import webdriver

import time

# server 启动参数
desired_caps = {}
# 设备信息
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '5.1'
desired_caps['deviceName'] = '127.0.0.1:5555'
# app信息
desired_caps['appPackage'] = 'com.android.settings'
desired_caps['appActivity'] = '.Settings' driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
print(driver)
time.sleep(5) driver.quit()

【已解决】:Original error: Could not extract PIDs from ps output. PIDS: [], Procs: [“ps: uiautomator”]的更多相关文章

  1. appium报错信息:Could not extract PIDs from ps output. PIDS: [], Procs: ["bad pid 'uiautomator'"]”

    appium+Java 自动化测试真机测试时报错“info: [debug] Error: Could not extract PIDs from ps output. PIDS: [], Procs ...

  2. 【已解决】ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked

    官网说明: elasticsearch官网建议生产环境需要设置bootstrap.memory_lock: true 官网的解释 是:发生系统swapping的时候ES节点的性能会非常差,也会影响节点 ...

  3. 【已解决】Error running 'xxx项目' Command line is too long(idea版)

    [错误] Error running 'xxx项目': Command line is too long. Shorten command line for xxx or also for Sprin ...

  4. 【已解决】error setting certificate verify locations报错

    目录 1.问题描述 2.问题分析 3.解决方法 1.问题描述 在公司的电脑上从Github上clone项目的时候git黑窗口报错"error setting certificate veri ...

  5. Atlas系列一:【已解决】error while loading shared libraries: libcrypto.so.6: cannot open shared object file: No such file or directory

    1:Atlas的安装 https://github.com/Qihoo360/Atlas/wiki/Atlas的安装 2: [root@localhost bin]# ./mysql-proxyd t ...

  6. appium+python自动化测试真机测试时报错“info: [debug] Error: Could not extract PIDs from ps output. PIDS: [], Procs: ["bad pid 'uiautomator'"]”

    刚开始启动服务时,弹出授权提示,以为是手机app权限问题,后来debug后,发现了一个警告日志:UiAutomator did not shut down fast enough, calling i ...

  7. python+appium 【已解决】真机运行appium报错“WebDriverException: Message: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c.......详见内文

    问题报错提示: selenium.common.exceptions.WebDriverException: Message: A new session could not be created. ...

  8. appium 出现报错“A new session could not be created. (Original error: Requested a new session but one was in progress)”的解决方式!

    报错点:selenium.common.exceptions.WebDriverException: Message: A new session could not be created. (Ori ...

  9. 已解决】Sublime中运行带input或raw_input的Python代码出错:EOFError: EOF when reading a line(转)

    [问题] 在折腾: [已解决]Sublime Text 2中运行Python程序出错:The system cannot find the file specified 的过程中,虽然解决了找不到py ...

  10. 【已解决】Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8

    [问题] 折腾: [已解决]Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8 过程中,增大对应AVD的内存为2G后,结果无法启 ...

随机推荐

  1. webgoat _v8.1全流程通关

    1.1 (A1)SQL Injection (intro) 概念 本课程介绍了什么是结构化查询语言(SQL),以及如何操纵它以执行开发人员原始意图之外的任务. 目标 用户将对SQL的工作原理和用途有基 ...

  2. 痞子衡嵌入式:在IAR开发环境下手动拷贝自定义程序段到RAM中执行的方法

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家分享的是IAR下手动拷贝自定义程序段到RAM中执行的方法. 在痞子衡旧文 <IAR下RT-Thread工程自定义函数段重定向失效分析> ...

  3. mongodb c driver bson的嵌套访问与层次结构

    使用c访问mongodb,需要用到mongodb c driver.c++的driver也是基于c driver封装的. 在使用c driver访问mongodb时,需要与bson打交道,不过c dr ...

  4. MySQL 出现 Error 1114 (HY000) The table is full 的解决方法

    版权声明:原创作品,谢绝转载!否则将追究法律责任. ----- 作者:kirin MySQL 出现 The table is full 只有一个原因,对应的表数据容量达到系统上限 . 这个问题可能是2 ...

  5. cookie和session的区别?一文讲透

    一.问题 cookie和session的区别? 二.回答 1.总结如下- cookie: - cookie存储于客户端本地,即浏览器缓存 - cookie存储着sessionId,作为后台sessio ...

  6. SQLBI_精通DAX课程笔记_03_计算列

    计算列是由DAX在表中生成的列,逐行计算并储存在模式之中. 以下链接是采悟老师关于度量值和计算列的区别的文章,可以同步查看. https://zhuanlan.zhihu.com/p/75462046 ...

  7. JavaWeb-JS基础

    4.JS基础 (1)JS的引入方式 HTML内部引入 将JS代码放在"< script >< /script >"标签之间 在HTML文档中,可以在任意地方 ...

  8. 如何优雅而不损失性能的实现SpringCloud Gateway网关参数加解密方案

    背景 为了增强产品安全性,计划对应用网关进行改造,主要是出入参经过网关时需要进行加解密操作,保证请求数据在网络传输过程中不会泄露或篡改. 考虑到密钥的安全性,每个用户登录都会签发独立的密钥对.同时摒弃 ...

  9. @Async实现异步任务

    1.@Async是SpringBoot自带的一个执行步任务注解 @EnableAsync // 开启异步 @SpringBootApplication public class Application ...

  10. Redis存储商品热度

    项目中有一个需求,就是可以根据商品的热度进行排序 起初想着使用string类型来存储如: sku:hotscore:商品的ID 但是这回有个问题,当商品数量多了那k-v岂不是得炸了,维护起来也非常不方 ...