I am trying to debug some inconsistent behaviour I am seeing in an application that gets its primary data from the internet. I don\'t see the issues in the simulator, just
With Xcode 8.3 and iOS 10.3:
XCUIDevice.shared().siriService.activate(voiceRecognitionText: "Turn off wifi")
XCUIDevice.shared().press(XCUIDeviceButton.home)
Be sure to include @available(iOS 10.3, *) at the top of your test suite file.
You could alternatively "Turn on Airplane Mode" if you prefer.
Once Siri turns off wifi or turns on Airplane Mode, you will need to dismiss the Siri dialogue that says that Siri requires internet. This is accomplished by pressing the home button, which dismisses the dialogue and returns to your app.