Created
February 18, 2020 20:08
-
-
Save raxxpack/b93bd4b930528d86e411d285510fda07 to your computer and use it in GitHub Desktop.
XCUIApplication Extension - Launch Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension XCUIApplication { | |
/// Launches the Settings app and verifies that the initial screen exists. | |
static func launchSettingsApp() -> XCUIApplication { | |
let app = XCUIApplication(bundleIdentifier: "com.apple.Preferences") | |
// Launch, terminate and again launch the Settings app to ensure we are in a clean state. | |
app.launch() | |
app.terminate() | |
app.launch() | |
app.navigationBars["Settings"].waitForIt() | |
return app | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment