appium: Unable to turn off wifi with appium 2.0.0-beta.35

The problem

Unable to turn off wifi with appium 2.0.0-beta.35 but with appium 1.22.2

Environment

using: https://github.com/appium/appium-docker-android with appium@next

  • Appium CLI: 2.0.0-beta.35 installed by npm
  • Last Appium version that did not exhibit the issue (been used for testing): 1.22.2
  • Drivers (only for Appium2):
    • uiautomator2@2.1.1
  • Node.js: v12.22.12/v16.15.0
  • Mobile devices:
    • nokia7.2: android 10
    • nokia g50: android 12
    • samsung s22: android 12
    • samsung a52: android 11
  • android SDK (the same between v1.22.2 && 2.0.0-beta.35) image
  • java-client: 7.3.0/8.0.0

Details

removed these apps before each trial

  • io.appium.settings
  • io.appium.uiautomator2.server
  • io.appium.uiautomator2.server.test

ps: using io.appium.settings installed by appium 2.0 with appium 1.22.2 will also fail the wifi action

Link to Appium logs

appium/adb logs for 2.0 and 1.22.2: https://gist.github.com/e74a6f025a5e5ca566b77207c7e52cc8.git

timestamp of turn off wifi: (appium log in US/Pacific, but looks like timestamp is incorrect)

  • 2.0: adb logcat > UTC+8, 05-12 18:09:42 - 05-12 18:09:43
  • 1.22.2: adb logcat > UTC+8, 05-13 12:15:55 - 05-13 12:15:56

Code To Reproduce Issue

((AndroidDriver) driver).setConnection(new ConnectionStateBuilder().withWiFiDisabled().build());

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 36 (15 by maintainers)

Most upvoted comments

https://github.com/appium/appium/issues/16967 is for the activateApp behavior thing.