Espresso: Thread.sleep( );
问题 Espresso claims that there is no need for Thread.sleep(); , but my code doesn't work unless I include it. I am connecting to an IP. While connecting, a progress dialog is shown. I need a sleep to wait for the dialog to dismiss. This is my test snippet where I use it: IP.enterIP(); // fills out an IP dialog (this is done with espresso) //progress dialog is now shown Thread.sleep(1500); onView(withId(R.id.button).perform(click()); I have tried this code with and without the Thread.sleep(); but