Android Robotium: how to go back to my Activity under test after clicking/launching another Activity

筅森魡賤 提交于 2019-12-01 21:19:30

Please try methods like

solo.clickOnView(R.id.myBtn)

to click on your button You can also try

solo.clickOnButton()

To go back to activity you can use

solo.goBack();

or

solo.goBackToActivity("ActivityName");

Once you call any activity outside your application, it’s not possible to come back to your application using solo.<any API>, because solo is tight to UID of your application and doesn't work on other app's activity (with different UID).

Basically solo can only work on activities which belong to the application for which it’s created.

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