Page tree
Skip to end of metadata
Go to start of metadata
SetNetworkConnection(Connection,Enable)

Supported in iOS Supported in Android

Description

The command gives the ability to set the network connection for a device.

Execute any of the following connection types:
airplane_mode, wifi, mobile_data, bluetooth

Note: Bluetooth is only supported for Android 5.* and above.

Parameters

  • airplane_mode
  • wifi
  • mobile_data
  • bluetooth

Usage

client.setDevice("adb:GT-I9505");
client.setNetworkConnection("airplane_mode", true);
client.setNetworkConnection("mobile_data", true);
client.setNetworkConnection("wifi", true);
client.setNetworkConnection("bluetooth", true);



Code Examples

Java Example
client.setNetworkConnection("airplane_mode", true);
C# Example
client.SetNetworkConnection("airplane_mode", true);
VBScript Example
client.SetNetworkConnection("airplane_mode", true)
Report
Python Example
 self.client.setNetworkConnection("airplane_mode", True)
Perl Example
$client->setNetworkConnection("airplane_mode", 1);
  • No labels