public interface NetworkConnection
Example usage:
NetworkConnection mobileDriver = (NetworkConnection) driver;
if (mobileDriver.getNetworkConnection() != ConnectionType.AIRPLANE_MODE) {
// enabling Airplane mode
mobileDriver.setNetworkConnection(ConnectionType.AIRPLANE_MODE);
}
| Modifier and Type | Interface and Description |
|---|---|
static class |
NetworkConnection.ConnectionType
ConnectionType is a bitmask to represent a device's network connection
Data | WIFI | Airplane
0 0 1 == 1
1 1 0 == 6
1 0 0 == 4
0 1 0 == 2
0 0 0 == 0
Giving "Data" the first bit positions in order to give room for the future of enabling
specific types of data (Edge / 2G, 3G, 4G, LTE, etc) if the device allows it.
|
| Modifier and Type | Method and Description |
|---|---|
NetworkConnection.ConnectionType |
getNetworkConnection()
Query the driver for the Airplane Mode setting state
|
NetworkConnection.ConnectionType |
setNetworkConnection(NetworkConnection.ConnectionType type)
Set the Connection type
Not all connection type combinations are valid for an individual type of device
and the remote endpoint will make a best effort to set the type as requested
|
NetworkConnection.ConnectionType getNetworkConnection()
NetworkConnection.ConnectionTypeNetworkConnection.ConnectionType setNetworkConnection(NetworkConnection.ConnectionType type)
type - ConnectionType of what the network connection should beNetworkConnection.ConnectionTypeCopyright © 2014. All rights reserved.