Skip to content

Instantly share code, notes, and snippets.

@ennioma
Last active March 16, 2018 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ennioma/9111e8a06aecab335774443a5084718e to your computer and use it in GitHub Desktop.
Save ennioma/9111e8a06aecab335774443a5084718e to your computer and use it in GitHub Desktop.
uitests_siri
// --> Test#1 <--
func testMainNavigationFromScratch() {
let app = XCUIApplication()
app.buttons["mainBtnAccId"].tap()
app.alerts["test"].buttons["oK"].tap()
}
// --> Test#2: resuming from background <--
func testMainNavigationFromBackground() {
XCUIDevice.shared().press(XCUIDeviceButton.home)
let appName = // get name from bundle
XCUIDevice.shared().siriService.activate(voiceRecognitionText: "open \(appName) app")
sleep(3)
self.checkUI() // some UITest code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment