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. ...
随机推荐
- python中的装饰器基本理论
装饰器 : 本质上 是一个 函数 原则 : 1,不修改原函数的源代码 2,不修改原函数的调用方式. 装饰器的知识储备 装饰器 = 高阶函数 + 函数嵌套 +闭包 我的理解是,函数名也是一个变量,将函数 ...
- Ubuntu紫色背景颜色代码
前言 我一直很中意Ubuntu的紫,记录一下颜色代码以免忘了! so Ubuntu紫色背景颜色代码background=300924 red = 48 green 9 blue 36
- linux 命令参数列表过长以及find用法
1.在一个目录下删除大批量的文件时,当使用 rm -rf 或者rm *会提示参数列表过长 通过修改命令为 :find . -name "*" | xargs rm -rf '* ...
- Nginx反向代理维基百科镜像制作全解析
近日做的Ngnx代理测试,基于Nginx的ngx_http_substitutions_filter_module模块,并利用UA跳转实现PC/移动端不同站点跳转. 1. 关于Nginx的代理详细请转 ...
- C语言基本数据类型大小
C语言基本数据类型占用的字节数可以通过如下例子获取: #include<stdio.h> int main(void) { printf("char size=%d \n&quo ...
- appium常见问题07_appium输入中文无效
前几天在appium android自动化测试过程中,使用send_keys()输入中文,发现只能输入字母和数字,输入中文无反应. 大家是否同样遇到过该问题,当大家同样遇到该问题时,在配置参数desi ...
- this关键字与super关键字区别
this super 1 访问属性 访问本类中属性,如果本类中没有此属性,就从父类继承过来的属性中查找 (遵循就近原则) 访问父类中的属性 2 调用方法 访问本类中方法 直接访问父类中方法 3 ...
- CSS div内放长英文字母或长数字自动换行 CSS一行排不下自动打断换行
添加css word-wrap:break-word 解释:使用break-word时,是将强制换行. 兼容各版本IE浏览器,兼容谷歌浏览器.
- 向服务器发送post请求
/** * 通过HttpClient发送Post请求 * @param path 请求路径 * @param params 请求参数 * @param encoding 编码 * @return 请求 ...
- js非布尔值的与(&&)与或(||)运算
/** * 非布尔值的与(&&)与或(||)运算 * 1.先将其转换成布尔值再做运算,并且返回原值 * 2.与(&&)运算: * a.如果第一个值为true,则返回第二 ...