一、错误提示
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.netelis.yobot' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: The permission to start '.ui.InitServerActivity' activity has been denied.Make sure the activity/package names are correct.
二、解决
原因是打开InitServerActivity时,无权限,需要添加权限,打开Android App 代码,在AndroidManifest.xml中给InitServerActivity加上权限配置
android:exported="true"
但不建议直接改App源码,给太多的Activity加exported属性,出现安全性问题,建议自动化测试时所有用例都从启动页开始,而不是直接跳转到某一个页面。
网友评论