appium 链接真机运行时报错
今天用appium链接真机时,碰到的第一个问题:Attempt to re-install io.appium.settings without first uninstalling.(这是日志中显示的报错信息)
解决办法:还在找原因,后续更新进来。
百度找到答案了,测试后,就没有再出现这个报错了。
appium_server_v1.4.16版本不适配android7.0系统,运行报错“Attempt to re-install io.appium.settings without first uninstalling”
要解决的问题:appium在androidV7.0系统上运行时报错 Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.settings without first uninstalling.]
原因分析:appium的uiautomator版本与androidV7.0不适配。
预置条件:手机端已经安装完Appium Settings 和 Unlock两个应用
解决步骤:1.修改源码文件-注释安装appiumSettings和unlock的两行代码
文件路径: C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js
2.修改源码文件如下:
a.打开 \Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js
b.在adb.js的1035行找到
this.shell(
"ps '"
+
name
+
"'"
, function (err, stdout) {
if
(err)
return
cb(err);
替换成
this.shell_grep(
"ps"
, name, function (err, stdout) {
if
(err) {
logger.debug(
"No matching processes found"
);
return
cb(null, []);
}
并增加上面用到的shell_grep函数:
ADB.prototype.shell_grep
=
function (cmd, grep, cb) {
if
(cmd.indexOf(
'"') === -1) {
cmd = '"'
+
cmd
+
'"'
;
}
var execCmd
=
'shell '
+
cmd
+
'| grep '
+
grep;
this.
exec
(execCmd, cb);
};
3.重启appium
appium 链接真机运行时报错的更多相关文章
- appium 链接真机后,运行代码,但是APP并没有启动
要淡定,链接真机后,问题一下多出来这么多,还没有启动程序,就碰到接二连三的问题. 爽到家了.慢慢解决吧. 具体问题是这样的: # coding=utf-8from appium import webd ...
- iOS 真机测试时报错:Provisioning profile "iOS Team Provisioning Profile: XXX” doesn't include the currently selected device “XXX”.
这几天因工作需要,去给客户演示iOS项目打包的过程.之前演示都是顺利的,但后来客户自己操作时打电话说遇到了问题,出现报错. 就过去看了一下,发现一个很陌生的错误提示: The operation co ...
- 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 ...
- appium 链接真机
1. 安装驱动 说明:如果驱动装不上,可以使用第三方的工具去安装.(一般来说还是用第三方) 这里推荐锤子科技的HandShaker, 地址:http://www.smartisan.com/apps/ ...
- xcode6 真机运行报错 Command /usr/bin/codesign failed with exit code 1
解决方法: 百度下载‘iphone配置实用工具’, 打开此软件之后,选择预配置描述文件, 选中iphone过期和重复的描述文件,按delete键删除.然后重启xcode即可
- Swift真机调试时报错dyld: Library not loaded: @rpath/libswiftCore.dylib
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/ ...
- Xcode真机运行报错iPhone has denied the launch request
1.打开钥匙串 ->Apple Worldwide Developer Relations Certification Authority ->双击 并点击信任->选择使用系统默认2 ...
- Xcode真机调试报错(证书的签发者无效)
Xcode真机调试时报错: dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib Referenced from: /var/mobi ...
- 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. ...
随机推荐
- (转载)虚拟机出现无法连接虚拟设备sata0:0,因为主机上没有相应设备
虚拟主机需要镜像文件, 如果是拷贝的虚拟机,还需要桥接联网的话,更改mac地址,
- JAVA中STL使用
Vector:和c++的vector使用方法类似. Vector<Integer> vec=new Vector<> (); ArrayList:Java.util.Array ...
- socket 接收和发送缓冲区
问题产生: 在进行客户端向服务端发送数据时,每次发送一定数量数据后发送端就等不到send函数的返回,导致程序一直卡死在send函数. 通过抓包发现:发送端发送过快而接收端处理速度过慢,导致快速发送一定 ...
- 用 Flask 来写个轻博客 (26) — 使用 Flask-Celery-Helper 实现异步任务
Blog 项目源码:https://github.com/JmilkFan/JmilkFan-s-Blog 目录 目录 前文列表 扩展阅读 Celery 将 Celery 加入到应用中 实现向新用户发 ...
- Apache Shiro 会话+缓存+记住我(三)
1.会话管理SessionDao和SessionManager 1)安装Redis 2)依赖 <dependency> <groupId>redis.clients</g ...
- FastJSON 远程执行漏洞,速速升级!
相信大家用 FastJSON 的人应该不少,居然有漏洞,还不知道的赶紧往下看,已经知道此漏洞的请略过-- 2019年6月22日,阿里云云盾应急响应中心监测到FastJSON存在0day漏洞,攻击者可以 ...
- django创建web页面
https://blog.csdn.net/ImagineCode/article/details/54586326 https://blog.csdn.net/qq_29186489/article ...
- 解决text-align: justify;浏览器、安卓手机不兼容问题
1.兼容PC端浏览器 .h_text{ text-align:justify; text-justify:inter-ideograph;width:200px;} .span_hid{ displa ...
- object of type 'Response' has no len()
看见没,这里括号弄错了! 网上解释是requests.get()得到的是一个response对象,无法用BeautifulSoup解析,如果要解析,解析对象应该是requests.get().cont ...
- Linux系统安全
简单优化: 1.删除不必要的软件包(如postfix等) yum remove -y postfix 安装管理:1.口令 1.1至少8个字符,大小写.特殊字符和数字组合,定期更改 1.2口令长度可以编 ...