Can monkeyrunner interact with android notifications?

穿精又带淫゛_ 提交于 2019-12-25 05:03:58

问题


I'm starting to look at android monkeyrunner, and would like to test my application with it.

My application opens a Notification in the android pull-down menu, and I would like monkeyrunner to test if the notification behaves correctly. Is it possible to use monkeyrunner to "click" on an incoming notification and verify the result?

I've searched the documentation, and it seems like I can only test activities, but maybe I'm missing something.


回答1:


MonkeyRunner is able to interact with the entire device. But it may be hard to correctly setup a drag event to get the notification bar. An easier way to tell what's in your notification bar might be to use adb shell dumpsys notification. You could do this in MonkeyRunner by doing device.shell('dumpsys notification').



来源:https://stackoverflow.com/questions/11259760/can-monkeyrunner-interact-with-android-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!