Android Appium-runAppInBackground引发WebDriverException
我正在使用Appium自动化Android应用程序的测试。最近,当应用程序被推到后台并再次启动时,我在尝试测试应用程序的行为时遇到了一个错误。幸运的是,我找到了方法Android Appium-runAppInBackground引发WebDriverException,android,selenium,selenium-webdriver,appium,Android,Selenium,Selenium Webdriver,Appium,我正在使用Appium自动化Android应用程序的测试。最近,当应用程序被推到后台并再次启动时,我在尝试测试应用程序的行为时遇到了一个错误。幸运的是,我找到了方法appiumDriver.runAppInBackground(Duration-Duration) …但当我执行appiumDriver.runAppInBackground时(持续时间为秒(1))我收到一个异常 我在android仿真器(PIXEL_API_25)上运行测试,我使用Appium 1.7.2和java_client
appiumDriver.runAppInBackground(Duration-Duration)
…但当我执行appiumDriver.runAppInBackground时(持续时间为秒(1))代码>我收到一个异常
我在android仿真器(PIXEL_API_25)上运行测试,我使用Appium 1.7.2和java_client 5.0.4,但将来,它们也应该在iOS上运行
APPIUMDRIVE变量是静态的(不确定这是否会产生影响…)
谢谢你的帮助 stacktrace的问题很明显:
原始错误:“命令”C:\\Users\\User\\AppData\\Local\\Android\\Sdk\\platform tools\\adb.exe'-P 5037-s emulator-5554 shell am start-W-n de.abc.myApp/.BookingOverviewActivity“已退出,代码为1”;Stderr:'java.lang.SecurityException:权限拒绝:从null(pid=7759,uid=2000)启动意图{flg=0x10000000 cmp=de.abc.myApp/.BookingOverviewActivity}未从uid 10224导出
由于权限限制,Appium无法从后台启动您的应用。尝试使用5秒和不同的设备
如果仍然复制:要修复它,您需要在BookingOverviewActivity
活动的清单文件中使用android:exported=“true”
更新您的应用程序源代码。stacktrace中的问题非常清楚:
原始错误:“命令”C:\\Users\\User\\AppData\\Local\\Android\\Sdk\\platform tools\\adb.exe'-P 5037-s emulator-5554 shell am start-W-n de.abc.myApp/.BookingOverviewActivity“已退出,代码为1”;Stderr:'java.lang.SecurityException:权限拒绝:从null(pid=7759,uid=2000)启动意图{flg=0x10000000 cmp=de.abc.myApp/.BookingOverviewActivity}未从uid 10224导出
由于权限限制,Appium无法从后台启动您的应用。尝试使用5秒和不同的设备
如果仍然复制:要修复它,您需要在BookingOverviewActivity
活动的清单文件中使用android:exported=“true”
更新应用程序源代码。同时,我找到了一个适合我的解决方案
通过将Appium从1.7.2更新到1.8.1,问题得以解决。同时,我找到了一个适合我的解决方案
通过将Appium从1.7.2更新到1.8.1,问题得以解决。感谢您的建议!5秒,另一个设备对我不起作用。目前我无法更改应用程序源代码,我希望稍后可以尝试。谢谢您的建议!5秒,另一个设备对我不起作用。目前我无法更改应用程序的源代码,我希望以后可以尝试。