-
Notifications
You must be signed in to change notification settings - Fork 174
Find a quick way to see if the monkey manages to leave the application #4
Comments
To detect if app is currently running or not: let isRunning = XCUIApplication().running
print("Application is currently running: \(isRunning)") To detect if app is currently active or not: if ((FBApplication.fb_active()?.label)! == "YoursAppName") {
// still in app
} else {
// not in app anymore
} it checks if current active application on screen has proper label - but it requires I'm not sure if checking for active app is possible with current XCTest API. @DagAgren what would you like to achieve in this issue? if application gets crashed/is not running anymore - just finish the tests? as a fail? |
GH-4 Added reactivation of the app after each action is generated
Added functionality to return to the app if Monkey exited it accidentally |
Thank you! |
This solution kind of solved the problem but this solution will start the test even after the test fails. |
@singh88 even if |
Try to find out if there is a way to detect from test code if the application has been exited so the test can stop.
The text was updated successfully, but these errors were encountered: