Well... this is not very good but 
You can go to General --> Accessibility and activate the AssistiveTouch. Then place that icon where it wont break anything on your tests.
Now when you need to enable flight mode your tests will be something like:
- One tap on the AssistiveTouch icon
- One tap on the Home button of AssistiveTouch icon
- Tap on Settings
- Tap on Airplane Mode switch in order to enable/disable it
Its not good I know, but its the only way I found to make some magic happen
and mess around settings, etc.
Use the TouchAction class for the taps, swipes, scrolls, etc.