报错截图



因为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. .NET Conf 2023 将在 11 月 15日-17 日 举行 ,附中文日程表

    北京时间 11月15-17日,.NET Conf 2023 即将到来!大会上将发布.NET 8, 以今为止运行最快的.NET 平台, .NET Conf 始终致力于为所有与会者创造世界级的.引人入胜的 ...

  2. 聊聊Flink必知必会(五)

    聊聊Flink的必知必会(三) 聊聊Flink必知必会(四) 从源码中,根据关键的代码,梳理一下Flink中的时间与窗口实现逻辑. WindowedStream 对数据流执行keyBy()操作后,再调 ...

  3. go并发 - goroutine

    概述 Go并发模型独树一帜,简洁.高效.Go语言最小执行单位称为协程(goroutine),运行时可以创建成千万上个协程,这在Java.C等线程模型中是不可想象的,并发模型是Go的招牌能力之一.很多文 ...

  4. 下载神器——you-get

    下载神器--you-get 01. you-get下载 you-get是一个基于Python3开发的开源项目. 某些网站的音视频资源,本身不提供下载功能,通过you-get,可以通过几条简单的命令去下 ...

  5. IDEA安装与配置教程

    一.下载并安装IDEA 1.下载 1.官网: 下载 IntelliJ IDEA (这里以Windows系统为例,其他系统类似) 2.安装 1.下载完成后,直接点击安装包安装,即可. 2.开始安装,然后 ...

  6. 吉特日化MES & 实施Windows Server 远程登录的问题

    Windows远程登录提醒:由于没有远程桌面授权服务器可以提供许可证,远程会话连接已断开.请跟服务器管理员联系. 由于没有远程桌面授权服务器可以提供许可证,远程会话连接已断开.请跟服务器管理员联系. ...

  7. [QOJ4815] Flower's Land

    简要题意:给出一个 \(n\) 个点的树,对某个点 \(i\) 求包含某一个点的大小为 \(k\) 的权值最大的连通块,一个连通块的权值是其所有点的权值之和. \(n\le 40000,k\le \m ...

  8. SpringBoot整合Swagger3

    1.导入相关依赖 <!--swagger--> <dependency> <groupId>io.springfox</groupId> <art ...

  9. Python——第四章:匿名函数(lambda 函数)

    匿名函数也被称为 lambda 函数 lambda 函数是一种小型.一次性的.可以在一行内定义的匿名函数.它通常用于一些简单的操作,例如传递给高阶函数(接受函数作为参数的函数)或在一行内定义短小的功能 ...

  10. Map的特性(有序和无序)讨论

    目录 什么是红黑树? 在 Java 中,基础java.util.Map 接口本身并不保证元素的顺序.具体的实现类 HashMap 和 TreeMap 的行为(无序.有序)有所不同: HashMap 类 ...