Android, how to get information on which activity is currently showing (in foregorund)?

杀马特。学长 韩版系。学妹 提交于 2020-01-23 17:40:08

问题


I wonder if there is a way to get information on which activity currently has focus (is in the foreground)? I am using instrumentation and I would like to know which activity is currently running in the application that I am testing against.

Thanks


回答1:


Take a look at Robotium
'a open-source test framework created to make automatic black-box testing of Android applications significantly faster and easier than what is possible with Android instrumentation tests out-of-the-box.'

Homepage: http://www.robotium.org/
Source: http://github.com/jayway/robotium

Please note that the Robotium project is maintained by the company I work for



来源:https://stackoverflow.com/questions/1558750/android-how-to-get-information-on-which-activity-is-currently-showing-in-foreg

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