In order to test my app i need to switch on and switch off the WIFI, bluetooth etc.Is there a way to go to settings/preferences to turn my wifi on/off using UI Automation in IOS.
Asked
Active
Viewed 309 times
3

Display Name
- 4,502
- 2
- 47
- 63

Avinash
- 823
- 1
- 7
- 18
-
I would try dorit's answer here: http://stackoverflow.com/questions/21828552/programmatically-turn-on-off-wifi-on-real-ios-device-with-ui-automation – ishahak Oct 14 '15 at 13:52
1 Answers
1
No, you have to perform an external task, use performTaskWithPathArgumentsTimeout.
With a simple command you can switch off the network like:
ifconfig eth0 down
Use this as parameter. For a specific process I recommend to use TCPBlock. (Call tcpblock -a appname
.)

Display Name
- 4,502
- 2
- 47
- 63
-
1performTaskWithPathArgumentsTimeout runs on the host computer, not on the iOS device, therefore I don't think this is what is being asked for. – mikestew Nov 15 '13 at 17:03
-
1For a simulator, this is a good approach. For real devices, I'm afraid, there isn't any possibility to do that. – Display Name Nov 18 '13 at 08:15