appium: Wifi connection can't be enable/disable on Appium 1.5.3 using custom wrapper
The problem
Hi all! I updated Appium to the new one 1.5.3 recently and faced with issue that on Android wifi connection doesn’t enable or disable using new implementation driver.setConnection(Connection.NONE); and driver.setConnection(Connection.WIFI); on single and multithreaded tests.
Environment
- Appium 1.5.3
- I checked this implementation on Appium 1.4 version and it works fine
- OS/version used to run Appium: EL Capitan
- Node.js version (unless using Appium.app|exe): Node v6.2.2
- Mobile platform/version under test: Android
- Real device or emulator/simulator: Real devices Samsung S4(5.0.1) and Nexus 5 (5.1.1)
- Appium CLI or Appium.app|exe: Appium CLI and Appium application
- Device API level: 21
Link to Appium logs
https://gist.github.com/Mikulasi/455e76cf169819c3f642f0c92dcfb554
Code
public void setWifiOff() {
((AndroidDriver<?>) appiumcontroller().getMobileDriver()).setConnection(Connection.NONE);
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 25 (16 by maintainers)
@tfcardoso yes, current workaround using WifiManager implemented in UIAutomator2 driver. but unfortunately workaround will not work in all higher version real devices because of Android Security constraints and using adb commands also not working, we should investigate other possible means.