2012-02-23 14 views

Respuesta

13

Existen diferentes formas de hacerlo. En Robotium hay muchos métodos diferentes de espera para usar. En su caso se puede usar:

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. 

Por favor ver la Robotium API Documentation para más métodos WAITFOR en Robotium.

+0

Gracias ... parece que funciona, pero toma más tiempo de lo que esperaba cuando se utiliza este comando: ' solo.waitForActivity (. Solo.getCurrentActivity toString()());' – user952342

+0

@Renas si quiero esperar para los medios de la barra de progreso horizontal, ¿cómo podría usar estos métodos? – Manidroid

+0

solo.waitForDialogToClose() no funcionará si tiene un cuadro de diálogo de alerta inmediatamente después de progressdialog, robotium esperará a que se cierre el diálogo de alerta. – Suru

Cuestiones relacionadas