title: XCUITest - How to disable Wi Fi while app is running?
body: <p>I want to automate how ios App behave while running the XCUITest. When manually executing the test, I turn off the wi fi adapter. How do I do that using Xcode UI test?</p>
  
  <p>thanks</p>
  
  <p>p.s. I found that we can use below command to disable wi fi. But to do this I will need to send my app to background. I need to do this without sending current app to background.</p>
  
  <pre><code>let settingsApp = XCUIApplication(bundleIdentifier: "com.apple.Preferences")
  
  settingsApp.launch()
  
  settingsApp.tables.cells["Airplane Mode"].tap()
  </code></pre>