* Get information about the current network connection (Data/WIFI/Airplane). * The actual server value will be a number. However WebdriverIO additional * properties to the response object to allow easier assertions. * * ```js * let con = await I.grabNetworkConnection(); * ``` *
()
| 831 | * Appium: support only Android |
| 832 | */ |
| 833 | async grabNetworkConnection() { |
| 834 | onlyForApps.call(this, supportedPlatform.android) |
| 835 | const res = await this.browser.getNetworkConnection() |
| 836 | return { |
| 837 | value: res, |
| 838 | inAirplaneMode: res.inAirplaneMode, |
| 839 | hasWifi: res.hasWifi, |
| 840 | hasData: res.hasData, |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | /** |
| 845 | * Get current orientation. |
no outgoing calls
no test coverage detected