解散警报器后,不再检测到屏幕上的任何元素 [英] After dismissing the alert appium is no longer detecting any element on the screen

查看:74
本文介绍了解散警报器后,不再检测到屏幕上的任何元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,一切都将起作用,直到屏幕上显示通知为止.我解除警报i后,appium不再检测到我的任何按钮,字段等.唯一有效的方法是,如果我将应用程序置于后台并恢复运行.恢复后,一切正常. (我在Android 7.0中使用Appium 1.6.4).

Basically everything works until a notification is displayed on screen. After i dismiss the alert i, appium is no longer detecting any of my buttons, fields, etc. The only things that works is if i put the app in background and resume it. After resume everything works. (i`m using Appium 1.6.4, with Android 7.0).

这里有任何提示吗?

推荐答案

这是已知问题在appium项目中.

It is known issue in appium project.

我使用的解决方法:

  • 在打开对话框之前获取屏幕上任何元素的坐标(x,y)
  • 与对话框互动(例如选择元素,关闭等)
  • 在关闭对话框后点击坐标(x,y):

new TouchAction(driver).tap(x, y).perform();

只有在按坐标单击屏幕之后,它才会找到元素.

Only after clicking on screen by coordinates it will find elements.

这篇关于解散警报器后,不再检测到屏幕上的任何元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆