2012-02-23 145 views

回答

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 Documentation在Robotium更WAITFOR方法。

+0

谢谢...这似乎工作,但需要更长的时间比我预期的,当我使用这个命令: 'solo.waitForActivity(solo.getCurrentActivity()的toString());如果我要等待' – user952342 2012-02-23 17:45:53

+0

@Renas对于水平进度条的意思,我怎么可以使用这些方法? – Manidroid 2013-10-16 05:21:50

+0

如果您在progressdialog之后立即有警报对话框,则solo.waitForDialogToClose()将不起作用,robotium将等待警报对话框关闭。 – Suru 2014-07-17 09:43:03

相关问题