【已解决】:Original error: Could not extract PIDs from ps output. PIDS: [], Procs: [“ps: uiautomator”]
报错截图

因为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”]的更多相关文章
- 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 ...
- 【已解决】ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked
官网说明: elasticsearch官网建议生产环境需要设置bootstrap.memory_lock: true 官网的解释 是:发生系统swapping的时候ES节点的性能会非常差,也会影响节点 ...
- 【已解决】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 ...
- 【已解决】error setting certificate verify locations报错
目录 1.问题描述 2.问题分析 3.解决方法 1.问题描述 在公司的电脑上从Github上clone项目的时候git黑窗口报错"error setting certificate veri ...
- 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 ...
- 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 ...
- 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. ...
- 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 ...
- 已解决】Sublime中运行带input或raw_input的Python代码出错:EOFError: EOF when reading a line(转)
[问题] 在折腾: [已解决]Sublime Text 2中运行Python程序出错:The system cannot find the file specified 的过程中,虽然解决了找不到py ...
- 【已解决】Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8
[问题] 折腾: [已解决]Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8 过程中,增大对应AVD的内存为2G后,结果无法启 ...
随机推荐
- 【scipy 基础】--线性代数
SciPy的linalg模块是SciPy库中的一个子模块,它提供了许多用于线性代数运算的函数和工具,如矩阵求逆.特征值.行列式.线性方程组求解等. 相比于NumPy的linalg模块,SciPy的li ...
- promise时效架构升级方案的实施及落地
一.项目背景 为什么需要架构升级 promise时效包含两个子系统:内核时效计算系统(系统核心是时效计算)和组件化时效系统(系统核心是复杂业务处理以及多种时效业务聚合,承接结算下单黄金流程流量),后者 ...
- Android 应用接入 Firebase Crashlytics 进行崩溃分析上报
前言 所在公司的项目中有一款应用应客户要求,需要接入 Firebase Crashlytics,在此提前练手,也做个总结.本文以最新的 Gradle 7.5 为例,如果 Gradle 版本比较低,添加 ...
- LabVIEW用布尔控件实现上升沿和下降沿触发
我们利用了第三方布尔控件来记录摇杆的高低电平状态,并和摇杆布尔控件组成布尔数组,转换成十进制数进行判断上升沿和下降. 上升沿触发.例如一开始第三方布尔控件为T,夹紧松开布尔控件为F,然后我这时把摇杆控 ...
- ABAP 泰国凭证批导 报错 F51 192 输入一个业务场景
泰国凭证批导报错 F51 192 输入一个业务场景 方案一: 方案二: ID_BUPLA 用户参数
- C#中的并行处理、并行查询的方法你用对了吗?
Parallel.ForEach Parallel.ForEach 是一个用于在集合上并行执行迭代操作的强大工具.它通过有效地利用多核处理器的能力来提高性能.Parallel.ForEach 不仅能够 ...
- 记一次 .NET 某新能源材料检测系统 崩溃分析
一:背景 1. 讲故事 上周有位朋友找到我,说他的程序经常会偶发性崩溃,一直没找到原因,自己也抓了dump 也没分析出个所以然,让我帮忙看下怎么回事,那既然有 dump,那就开始分析呗. 二:Wind ...
- [cnn]FashionMINST训练+保存模型+调用模型判断给定图片
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim impor ...
- winform中也可以这样做数据展示✨
1.前言 在做winform开发的过程中,经常需要做数据展示的功能,之前一直使用的是gridcontrol控件,今天想通过一个示例,跟大家介绍一下如何在winform blazor hybrid中使用 ...
- 火山引擎ByteHouse基于云原生架构的实时导入探索与实践
更多技术交流.求职机会,欢迎关注字节跳动数据平台微信公众号,回复[1]进入官方交流群 随着企业降本增效.智能化数据决策需求的增强,传统的商业数据库已经难以满足和响应快速增长的业务诉求.在此背景下,云原 ...