being new to Android UiAutomator, i am able to validate some tests by script development, wanted to know 1) what would happen Or how UIautomator would handle / behave when an Application being tested gets an "Force close" Or "ANR" 2) please let me know if we should do anything specific to handle this ? will the remaining scripts continue to get executed if Force close or ANR occurs ?
Thanks in Advance
Crash dialogs can pose a problem when they prevent your test from finding the UI elements it expects. If you can dismiss the dialog however, your test can continue running (as long as your test is running in a different process to the one that was killed).
The difficult part is that these dialogs can appear at any point during your test execution. The UiWatcher class created for this reason. For each watcher registered using UiDevice.registerWatcher(..), UiAutomator will call the checkForCondition() method when it can't find an object. This gives you a chance to detect the crash dialog and dismiss it without it interfereing with your test.