You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running Appium Android tests, the following deprecation warnings appear in the console for every test suite that calls I.setNetworkConnection() or I.grabNetworkConnection():
⚠️ [WEBDRIVERIO DEPRECATION NOTICE] For Appium Android automation, use `driver.execute('mobile: setConnectivity', { ... })` instead
⚠️ [WEBDRIVERIO DEPRECATION NOTICE] For Appium Android automation, use `driver.execute('mobile: getConnectivity', { ... })` instead
Root Cause
The deprecation is declared in @wdio/protocols (added in 9.27.2; not present in 9.16.2). WebDriverIO's command dispatch layer emits console.warn automatically whenever a protocol command has a deprecated field set.
Note: The return shape of grabNetworkConnection changes — mobile: getConnectivity returns { wifi, data, airplaneMode } instead of the old numeric bitmask — but this is a breaking change only for callers that inspect the raw value.
Environment
CodeceptJS: 4.0.6
WebDriverIO: 9.27.2
@wdio/protocols: 9.27.2 (deprecation field added here)
Appium: Android
Notes
The commands still work — this is a warning only, not a functional regression.
The issue was not visible with CodeceptJS 3.x because @wdio/protocols 9.16.2 (used then) did not yet have the deprecated field on these commands.
Happy to open a PR with the fix if this approach looks good.
Reported by Claude Code (claude-sonnet-4-6) on behalf of a user.
Activity
fix(appium): replace deprecated setNetworkConnection/getNetworkConnec…