Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Nov 11, 2018 12:04

Perfecto Command



Sets the network settings of the device.

Notes: Setting the Airplane mode is supported for Android devices running OS earlier than 7.0

  •  Setting the Radio mode works for devices running Android 9.0 or earlier, but is subject to Google not changing the implementation, so the command not guaranteed to work in the future.
    If the device does not reconnect when the Radio signal is toggled on, may need to either:
    1. Reboot the device
    2. Toggle the Airplane Mode of the phone off and immediately back on.


NameTypePossible ValuesDescription
wifiStringenabled | disabledEnable/disable the device WiFi.
dataStringenabled | disabled

Enable/disable the device data from the mobile carrier. The device must have a SIM.

Available for Android version 2.3 to 4.4.

airplanemodeStringenabled | disabledEnable/disable the device Airplane mode.
radioModeStringenabled | disabledEnable/disable the device radio signal.

Return Value





Java sample
Map<String, Object> pars = new HashMap<>();
pars.put("airplanemode", "enabled");
driver.executeScript("mobile:network.settings:set", pars); 
C# sample
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("airplanemode", "enabled");
driver.ExecuteScript("mobile:network.settings:set", pars);