我运行带有appium的硒脚本,该脚本创建了一个新的APN或编辑了一个现有的。脚本运行良好,但是从昨天开始,我收到一条错误消息,不允许其更改该用户的APN设置!
我正在为此仿真设置代理,以运行测试
val extraCaps = DesiredCapabilities()
extraCaps.setCapability("appPackage", "com.android.settings")
extraCaps.setCapability("appActivity","com.android.settings.Settings\$ApnSettingsActivity")
extraCaps.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android")
extraCaps.setCapability(MobileCapabilityType.DEVICE_NAME, "Android_Device_Appium")
extraCaps.setCapability(MobileCapabilityType.UDID, System.getProperty("device.id", "emulator-5554"))
extraCaps.setCapability("noReset", false)
val appiumServer = URL(remoteTestingServer + "/wd/hub")
val settingsDriver = AndroidDriver<AndroidElement>(appiumServer, extraCaps)
settingsDriver.startActivity(Activity("com.android.settings", "com.android.settings.Settings\$ApnSettingsActivity"))