setNetworkConnection
Set network connection.
Types:
- airplane mode
- wifi on
- data on
These properties behave like a bitmask so if you set the network connection to 0 everything will get turned off. However if you for example set the network connection to 4 it will disable the airplane mode and turn off the wifi so that only data will be enabled. WebdriverIO provides a simplified interface to set these values without calculating bitmasks.
Note: if you have airplane mode enabled you can’t have wifi or data be enabled too (for obvious reasons)
Usage
1 | browser.setNetworkConnection(); |
Example
1 | it('should emulate network connection', function () { |