Appium iOS 无法检查通知层 [英] Appium iOS can't inspect notification layer

查看:31
本文介绍了Appium iOS 无法检查通知层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Appium 在我的 iOS 应用中测试我的通知.当 iOS 应用程序在 BG 中时,我用另一台设备发送通知.然后我使用 :

Im using Appium to test my notifications in my iOS app. Im sending with another device a notification while the iOS app is in BG. Then I swipe down using :

        ((IOSDriver) wd).swipe(500,0,500,1000,1000);

以上工作,屏幕向下滚动,我可以看到通知.问题是 appium 仍然会检查下面的屏幕.我检查了 appium 检查器,它验证了它除了通知一层下面的层的元素之外什么都不识别.

The above works, the screen get scrolled down and I can physically see the notification. The issue is that the appium still inspects the screen below. I checked appium inspector and it verified that it doesn't recognize nothing but the elemnts of the layer below the notifications one.

任何方法??

推荐答案

我找到了适合我需求的解决方法.

I found a workaround that fits my needs.

我发现如果我点击主页按钮然后向下滑动通知对 Appium 可见.因为 Appium 没有 iOS 的关键事件,所以 iPhone 有一个主页按钮的辅助功能选项,我把它打开,我可以在测试过程中简单地点击它并向下滑动通知中心.

I found out that if I click the home button and then swipe down the notification are visible to Appium. Because Appium not having key events for iOS, iPhone has the an accessibility option for home button, I toggled that on and I can simply click it during the test and swipe down the notification center.

我知道这并不理想,但它确实有效.感谢您的帮助.

I know it's not ideal but its working. Thanks for the help.

这篇关于Appium iOS 无法检查通知层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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