报错截图



因为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. vue 中引入pingfang字体 或者其他字体 支持ttf otf格式

    新建一个font 文件 里面放字体文件 可以百度搜索你想要的字体下载下来 一般10m左右 新建一个font.css 里面配置字体 @font-face {     font-family: 'PF'; ...

  2. 火山引擎ByteHouse:如何优化ClickHouse物化视图能力?

    更多技术交流.求职机会,欢迎关注字节跳动数据平台微信公众号,回复[1]进入官方交流群 近期,火山引擎 ByteHouse 升级了基于 ClickHouse 的物化视图能力,为解决数据量爆炸式增长带来的 ...

  3. 记录一次 postgresql 优化案例( 嵌套循环改HASH JOIN )

    今天同事给我一条5秒的SQL看看能不能优化. 表数据量: select count(1) from AAAA union all select count(1) from XXXXX; count - ...

  4. 🔥🔥Java开发者的Python快速进修指南:实战之跳表pro版本

    之前我们讲解了简易版的跳表,我希望你能亲自动手实现一个更完善的跳表,同时也可以尝试实现其他数据结构,例如动态数组或哈希表等.通过实践,我们能够发现自己在哪些方面还有所欠缺.这些方法只有在熟练掌握之后才 ...

  5. preparedStatement.setObject()为什么要这样写?

    setObject就是给JDBC的SQL语句的占位符赋值的,即是下面的"?" 预编译的SQL:参数使用?作为占位符 注意:sql的参数使用?作为占位符. 如: select * f ...

  6. IDEA编译器的永久试用设置与基本使用

    参考视频: 最通俗易懂的JDK.IDEA的安装使用权威指南 2023新版前端Web开发HTML5+CSS3+移动web视频教程,前端web入门首选黑马程序员 一.安装包下载与安装 官网下载地址 个人使 ...

  7. serdes级联时钟

    级联时钟在其他的IP领域下很少见到,在serdes中时个基本的功能. 因为高密场景下需要时钟数几十个IP,一般摆放在芯片边缘位置. 而SOC的管脚资源非常有限.因此就需要多个IP之间的ref clk进 ...

  8. DC静态时序分析之时钟篇

    DC静态时序分析之时钟篇博主微信:flm13724054952,不懂的有疑惑的也可以加微信咨询,欢迎大家前来投稿,谢谢! 引言介绍在芯片设计或者FPGA设计里面,根据有无时钟,将电路设计分为时序逻辑电 ...

  9. 关于eclipse中找不到recyclerview的问题

    在eclipse中直接引入v7包之后,还是找不到recyclerview的问题,我们可以通过 sdk\extras\android\support\v7\recyclerview\libs这个目录找到 ...

  10. 解决方案 | VS2022 + AutoCAD2024 + ObjectARX2024环境搭建过程

    一.准备工具 1.vs2022 自行网络搜索,各种版本均可(比如专业版.社区版),注意使用社区版必须使用最新版,目前是17.8版本,否则最终会无法使用样板. 2.cad2024 自行网络搜索 3.Ob ...