View Source Improve this doc

getNetworkConnection

Get informations about the current network connection (Data/WIFI/Airplane). The actual server value will be a number (see getNetworkConnection.js example). However WebdriverIO additional properties to the response object to allow easier assertions (see getNetworkConnectionEasier.js example).

Usage

1
browser.getNetworkConnection();

Example

getNetworkConnection.js
1
2
3
4
5
6
7
it('should get network connection of Android device', function () {
var connection = browser.getNetworkConnection();
console.log(connection.value); // returns 6
console.log(connection.inAirplaneMode); // returns false
console.log(connection.hasWifi); // returns true
console.log(connection.hasData); // returns true
});

Support

Support for android