Is there a way to send the application to background? Similarly to how you can call XCUIApplication.terminate(), I have some UI Elements to test on applic
I just tried UIApplication.sharedApplication().performSelector("suspend") successfully.
dispatch_after(2, dispatch_get_main_queue(), {
// suspend the app after two seconds
UIApplication.sharedApplication().performSelector("suspend")
})
// Swift 4 version
UIApplication.shared.perform(Selector("suspend"))