Robotium: How to wait for the download to complete before continuing?

I want to write a Robotium / Junit test for an Android application. At certain stages, I want my test to wait until the spinning boot symbol disappears from the screen.

How can i do this?

+6
source share
1 answer

There are different ways you can do this. There are many different waitFor methods in Robotium that you can use. In your case, you can use:

solo.waitForDialogToClose() //waits for the dialog to close solo.waitForActivity() // if there is a activity change solo.waitForText() //if a certain text appears after the loading is done solo.waitForView() //if a certain view is shown after the load screen is done. 

Please see Robotium API documentation for more highly anticipated methods in Robotium.

+13
source

Source: https://habr.com/ru/post/909178/


All Articles