SeeTestAutomation - setNetworkConnection
info
Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .
SetNetworkConnection(Connection,Enable)
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
info
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 Expand source
client.SetNetworkConnection("airplane_mode", true);
VBScript Example Expand source
client.SetNetworkConnection("airplane_mode", true)
Report
Python Example Expand source
self.client.setNetworkConnection("airplane_mode", True)
Perl Example Expand source
$client->setNetworkConnection("airplane_mode", 1);