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. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c "D:\AutoTest\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s GWY0216A22013956 install "D:\AutoTest\appium\Appium\node_modules\appium\build\unicode_ime_apk\UnicodeIME-debug.apk""
Failed to install D:\AutoTest\appium\Appium\node_modules\appium\build\unicode_ime_apk\UnicodeIME-debug.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.android.ime without first uninstalling.]
)
问题原因:
Appium在真机上运行时会自动在手机中安装2个apk,分别为:settings_apk-debug.apk和unlock_apk-debug.apk,此2个apk在电脑中存放的路径为:D:\AutoTest\appium\Appium\node_modules\appium\build 文件夹下(本人电脑存放的路径),真机上运行完一次脚本,需要再次运行时,要手动删除掉安装在手机上的settings_apk-debug.apk和unlock_apk-debug.apk,删除完成有一定的 遗留,所以删除后直接运行出现如上报错。
问题分析:
1、cmd命令框输入:adb shell pm list packages查看手机中安装的apk

2、将会查看到如上命令执行完确实存在一个:io.appium.android.ime

解决方案:
重启手机
卸载了手机
python+appium 【已解决】真机运行appium报错“WebDriverException: Message: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c.......详见内文的更多相关文章
- iOS真机运行 Xcode报错(libpng error: CgBI: unhandled critical chunk)问题已解决;
Cocos2d-x加载图片资源出现libpng error: CgBI: unhandled critical chunk Xcode7.3 设置Remove Text Metadata From P ...
- (已解决)iOS真机运行 Xcode报错(libpng error: CgBI: unhandled critical chunk)
Cocos2d-x加载图片资源出现libpng error: CgBI: unhandled critical chunk Xcode7.3 设置Remove Text Metadata From P ...
- 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 ...
- 如何在 iOS 真机运行 Appium
使用 gui 启动的 appium 1.2.2 也会有这个问题,所以你要把 deviceconsole 复制到 /Applications/Appium.app/Contents/Resources/ ...
- 在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错
在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错 解决方法: 或是都设置为yes.. Build Active Architecture Only的意思是只生成适应的指令集
- python webdriver 报错WebDriverException: Message: can't access dead object的原因(pycharm中)
PyCharm中运行firefox webdriver访问邮箱添加通讯录的时候报错-WebDriverException: Message: can't access dead object 调了半天 ...
- ionic真机调试Android报错 - could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon
在使用真机调试Android程序时,报错如下: could not read ok from ADB Server * failed to start daemon error: cannot con ...
- React Native真机红屏报错总结
一.run-android报错:unable to load script from assets 'index.android.bundl' 解决: 1.进入\android\app\src\mai ...
- Appium运行时没有启动activity的权限:A new session could not be created.(Original error: Permission to start activity denied)
小白搞appium,遇到启动不了activity的问题: 查找解决方案说是跟AndroidManifest.xml有关系,参考:https://github.com/appium/appium/iss ...
随机推荐
- MySql 动态语句
MyBatis的动态SQL是基于OGNL表达式的,它可以帮助我们方便的在SQL语句中实现某些逻辑. MyBatis中用于实现动态SQL的元素主要有: if choose(when,otherwise) ...
- Android字符串资源及其格式化
http://blog.csdn.NET/wsywl/article/details/6555959 在Android项目布局中,资源以XML文件的形式存储在res/目录下.为了更好的实现国际化及本地 ...
- mongodb的安装使用,window和centos环境
官网:https://www.mongodb.org/downloads 版本:最终稳定版 (mongodb-win32-x86_64-2008plus-ssl-3.2.6-signed.msi 绿色 ...
- 卸载重装Mysql
卸载重装前请备份数据库 卸载 sudo apt autoremove --purge mysql-server-core-5.7 清理残留 sudo rm -r /var/lib/mysql* sud ...
- python 编码形式简单入门
为什么使用Python 假设我们有这么一项任务:简单测试局域网中的电脑是否连通.这些电脑的ip范围从192.168.0.101到192.168.0.200. 思路:用shell编程.(Linux通常是 ...
- php定时执行操作及ob_flush()与flush()的使用
版权声明:本文为博主原创文章,未经博主允许不得转载. http://blog.csdn.net/qq_38125058 一: 每隔30s执行一次,将字符串写入文件 // 30秒执行一次 ignore_ ...
- git merge与 git rebase区别及实例
接Git分支创建与合并,在分支合并时,有两种方式:git merge 和git rebase. git merge:将两个分支,合并提交为一个新提交,并且新提交有2个parent. git rebas ...
- ASCII、 Unicode 和 UTF8
ASCII: 英文字母与数字编号的一一对应.每个英文字母对应一个编号.范围0~127 Unicode: 全世界所有语言中字符与数字编号的一一对应.也即为存在的每个字符指定一个唯一的编号.范围为0~0x ...
- redis的持久化之AOF
AOF Redis 分别提供了 RDB 和 AOF 两种持久化机制: RDB 将数据库的快照(snapshot)以二进制的方式保存到磁盘中. AOF 则以协议文本的方式,将所有对数据库进行过写入的命令 ...
- 由于github仓库中提前建立readme文件,导致git push报错error: failed to push some refs to 'git@github.com:
$ git push -u origin master To git@github.com:xxx/xxx.git ! [rejected] master -> master (fetch fi ...