Package org.openqa.selenium.mobile
Interface NetworkConnection
-
public interface NetworkConnection
Control a device's network connectionExample usage:
NetworkConnection mobileDriver = (NetworkConnection) driver; if (mobileDriver.getNetworkConnection() != ConnectionType.AIRPLANE_MODE) { // enabling Airplane mode mobileDriver.setNetworkConnection(ConnectionType.AIRPLANE_MODE); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
NetworkConnection.ConnectionType
ConnectionType is a bitmask to represent a device's network connection
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NetworkConnection.ConnectionType
getNetworkConnection()
Query the driver for the Airplane Mode setting stateNetworkConnection.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
-
-
-
Method Detail
-
getNetworkConnection
NetworkConnection.ConnectionType getNetworkConnection()
Query the driver for the Airplane Mode setting state- Returns:
NetworkConnection.ConnectionType
indicating if the device is in Airplane Mode
-
setNetworkConnection
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- Parameters:
type
- ConnectionType of what the network connection should be- Returns:
NetworkConnection.ConnectionType
of what the device's network connection is
-
-