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
Name | Value | Description |
---|---|---|
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.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
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
}