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

Description

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

Parameters

NameValueDescription
Connection 

String with values as

  • airplane_mode
  • wifi
  • mobile_data
  • Bluetooth
Connection types
EnableBooleanEnable/Disable

Usage

Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with the appropriate URL in the code snippet below.

Example

SetNetworkConnection
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
            
...
...
//Set the Network connection as airplane_mode
seetest.setNetworkConnection("airplane_mode", true);


Note: Some Xiaomi devices with Android 6 and MIUI 9 Xiaomi have added their own permission manager. It needs to be disabled in order to use this command.

In order to do disable Permission Manager:

  1. Turn off MIUI optimization under Developer options.
  2. Reboot the device.
  3. Under Settings go to Permissions.
  4. Click on the gear icon.
  5. Turn off the Permission Manager.


  • No labels