Progress dialog and waitForDialogToClose

312 views
Skip to first unread message

pbuda

unread,
May 2, 2012, 4:38:38 AM5/2/12
to Robotium Developers
Hello everyone.
I'm very new to Android. I'm writing my first application and I have a
small problem with writing a test.

My use case is that when user opens up an activity, some operation
will take place so I'm showing a progress dialog. When the operation
completes, data is saved in preferences and dialog is closed.
The whole operation is done on another thread using AsyncTask. I
wanted to test whether this saved data is correct but I have some
problems with detecting whether the progress dialog disappeared.

I'm using waitForDialogToClose but sometimes dialog closes before it
is invoked which results in timeout and test fail. Because I'm new to
Android I might be doing something wrong or there may be another way
of determining that the long operation completed. Anyway, I'm looking
for solutions, thanks.
Reply all
Reply to author
Forward
0 new messages