3

I'm trying to automate setting the iOS into airplane mode, but I don't know how to access the settings panel to do so.

I have tried the following to be able to see if the settings panel is listed when the app is in the background so as to be able to know what it is to access the settings:

target.deactivateAppForDuration(10); window.logElementTree();

HOWEVER, this just puts the App in the background for ten seconds and then lists the elements in the App window.

Any ideas on how to to access the settings panel to turn on airplane mode?

Thanks in advance

nschum
  • 15,322
  • 5
  • 58
  • 56
  • I am trying similar things during my ui automation tests but for example lock the screen or putting the app into background for not a particular duration and answer an APNS that should bring the app to forground or unlock the device again. Havnt found a solution yet. Did you in the end have any success? With an command or apple script maybe? – julesmummdry Apr 12 '16 at 13:23

1 Answers1

0

I don't think this it's possible to manipulate other apps than the one you're testing. You might consider creating a UIButton #if DEBUG to Activate airplane mode programmatically? Then, use UI Automation to tap that button.

Community
  • 1
  • 1
ma11hew28
  • 121,420
  • 116
  • 450
  • 651