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
In my case I wanted to background the app and open it where I previously left it. To background the app:
XCUIDevice.shared.press(.home)
To re-open the app where I left it:
XCUIApplication().activate()
Re-launching the app using XCUIApplication().launch()
would launch the app from new.
I am using Swift 4.2