Skip to main content

GetNetworkConnection

Description

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

info

Note : This command only works in Android Device.

Parameters

NameValueDescription
Network type* airplane_mode

* wifi

* mobile_data

* Bluetooth
Checks if a device is in given network type.

Usage

Command can be used to check if a device is in a given network mode.

info

Replace <server> with the appropriate URL.

GetNetworkConnection

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");

...
...// Checks if network is given network type and corresponding action can be taken.
if(seetest.getNetworkConnection("airplane_mode")){
// If statement
}