Package org.openqa.selenium.mobile
Class NetworkConnection.ConnectionType
- java.lang.Object
-
- org.openqa.selenium.mobile.NetworkConnection.ConnectionType
-
- Enclosing interface:
- NetworkConnection
public static class NetworkConnection.ConnectionType extends java.lang.Object
ConnectionType is a bitmask to represent a device's network connectionData | 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.
-
-
Field Summary
Fields Modifier and Type Field Description static NetworkConnection.ConnectionType
AIRPLANE_MODE
static NetworkConnection.ConnectionType
ALL
static NetworkConnection.ConnectionType
DATA
static NetworkConnection.ConnectionType
NONE
static NetworkConnection.ConnectionType
WIFI
-
Constructor Summary
Constructors Constructor Description ConnectionType(int mask)
ConnectionType(java.lang.Boolean wifi, java.lang.Boolean data, java.lang.Boolean airplaneMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object type)
int
hashCode()
java.lang.Boolean
isAirplaneMode()
java.lang.Boolean
isDataEnabled()
java.lang.Boolean
isWifiEnabled()
java.lang.Integer
toJson()
java.lang.String
toString()
-
-
-
Field Detail
-
WIFI
public static final NetworkConnection.ConnectionType WIFI
-
DATA
public static final NetworkConnection.ConnectionType DATA
-
AIRPLANE_MODE
public static final NetworkConnection.ConnectionType AIRPLANE_MODE
-
ALL
public static final NetworkConnection.ConnectionType ALL
-
NONE
public static final NetworkConnection.ConnectionType NONE
-
-
Method Detail
-
isAirplaneMode
public java.lang.Boolean isAirplaneMode()
-
isWifiEnabled
public java.lang.Boolean isWifiEnabled()
-
isDataEnabled
public java.lang.Boolean isDataEnabled()
-
equals
public boolean equals(java.lang.Object type)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toJson
public java.lang.Integer toJson()
-
-