/ / Robotium:先へ進む前に、読み込みが完了するのを待つにはどうすればよいですか? - java、android、junit、robotium

Robotium:続行する前に、読み込みが完了するのを待つ方法を教えてください。 - java、android、junit、robotium

私はAndroidアプリ用のRobotium / Junitテストを書きたいと思います。特定の手順で、回転している読み込み記号が画面から消えるまでテストを待機させます。

どうやってやるの?

回答:

回答№1の13

あなたがそれを行うことができるさまざまな方法があります。 Robotiumには、さまざまなwaitForメソッドがあります。あなたのケースではあなたが使用することができます:

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.

詳細はこちらをご覧ください Robotium APIドキュメント RobotiumでのwaitForメソッドの詳細