Create a gist now

Instantly share code, notes, and snippets.

@ennioma /uitests_siri.swift Secret
Last active Mar 16, 2018

What would you like to do?
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