Thursday, September 9, 2010

[android-developers] How to obtain/dismiss the topmost dialog in UI test

Scenario:
User delete an entry of his/her data, we popup a dialog to ask for
confirmation(Yes/No).

Code:
AlertDialog alert = new AlertDialog();
alert.show()

Problem:
In UI test code, we need to click one of the Yes and No buttons to
dismiss the dialog.
How to get obtain the dialog object or either of the buttons in it?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment