1import org.openqa.selenium.remote.mobile.*;2RemoteNetworkConnection net = new RemoteNetworkConnection(driver);3net.setNetworkConnection(NetworkConnection.ConnectionType.DATA_ONLY, true);4net.setNetworkConnection(NetworkConnection.ConnectionType.DATA_ONLY, false);5net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);6net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);7net.setNetworkConnection(NetworkConnection.ConnectionType.AIRPLANE_MODE, true);8net.setNetworkConnection(NetworkConnection.ConnectionType.AIRPLANE_MODE, false);9net.setNetworkConnection(NetworkConnection.ConnectionType.ALL_NETWORK_ON, true);10net.setNetworkConnection(NetworkConnection.ConnectionType.ALL_NETWORK_ON, false);11net.setNetworkConnection(NetworkConnection.ConnectionType.NO_CONNECTION, true);12net.setNetworkConnection(NetworkConnection.ConnectionType.NO_CONNECTION, false);13net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_P2P, true);14net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_P2P, false);15net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);16net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);17net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);18net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);19net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);20net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);21net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);22net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);23net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);24net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);25net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);26net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);27net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);28net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);29net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);30net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);31net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);32net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);33net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);34net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);35net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, true);36net.setNetworkConnection(NetworkConnection.ConnectionType.WIFI_ONLY, false);