九零不老心
发布于 2019-10-09 / 7 阅读 / 0 评论 / 0 点赞

appium检测app是否崩溃

在使用appium自动化安卓设备或者ios设备app时,很可能遇到app本身crash的情况,如果不做存活检测的话,很可能app已经崩溃,client程序却仍在执行。

搜索结果的建议是:

https://discuss.appium.io/t/how-to-detect-app-crash-in-reality/498/6

https://github.com/appium/appium/issues/1147

https://testerhome.com/topics/230

实际操作可尝试方法:

driver.current_activity in self.desired_caps['appActivity']

或者监测appium的log日志等事件触发