Appium+python自动化测试过程中问题
一、自动删除contactmanager
自动化测试appium提供的sample如下包/activity:com.example.android.contactmanager/.ContactManager ,发现提示如下错误
info: [debug] Error: Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
> at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1146:21)
> at [object Object].<anonymous> (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
> at ChildProcess.exithandler (child_process.js:742:7)
> at ChildProcess.emit (events.js:110:17)
> at maybeClose (child_process.js:1016:16)
> at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
> info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity)","origValue":"Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity"},"sessionId":null}
> info: <-- POST /wd/hub/session 500 2518.066 ms - 346
发现提示该包不存在。很奇怪我安装了之后确认能够运行了之后再运行的自动化代码,为什么提示不存在呢?
于是观察模拟器运行界面信息,发现启动代码后自动把模拟器中的contactmanager删除了,那当然找不到这个包和activity啦。
二、Failed to start an Appium session, err was: Error: Requested a new session but one was in progress
这是由于之前的会话没有关闭,然后你又开启了测试实例,解决方法:
1. 停止appium服务
2. 在Genarel Setting那里设置覆盖Session,重启Appium
测试结束在AfterClass加driver.quit()
最新文章
- useradd命令老是忘记的参数
- 重温WCF之构建一个简单的WCF(一)(2)通过Windows Service寄宿服务和WCF中实现操作重载
- PHP面向对象学习四 类的关键字
- GnuPG 的PGP使用
- Backbone Model——数据模型
- 使用 AFNetworking 进行 XML 和 JSON 数据请求
- 每天一个linux命令(8):cat 命令
- jquery CDN(内容分发网络)使用
- 如何用VS调试不属于解决方案的EXE和DLL程序
- C. Polycarpus&#39; Dice
- php遍历mysql资源
- Oracle 学习笔记(一)Oracle的基本介绍与语法
- jQuery选择器——全新的总结方式
- 数据库连接池(c3p0)
- Python内置函数(52)——getattr
- Mysql -- 数据类型(2)
- 捕鱼达人Demo版下载
- python 几分钟前,几小时前,几天前转为时间戳
- jQuery下ajax事件的简单分析
- SVN下载时提示“已经锁定”
热门文章
- [BUUCTF]PWN——CmmC_Simplerop
- LuoguB2008 计算 (a+b)&#215;c 的值 题解
- AcWing429. 奖学金
- 【LeetCode】280. Wiggle Sort 解题报告 (C++)
- 【LeetCode】1064. Fixed Point 解题报告(C++)
- 防止 jar 包被反编译
- java泛型中<;?>;和<;T>;
- GPT and BERT
- matplotlib 进阶之Constrained Layout Guide
- Type-C扩展芯片|Type-C扩展方案|CSCapstone|扩展坞方案选型