关键字:activiy获取 topActiviy 获取、Appium启动
Appium 启动报错,
很有可能是你找到的Activity并不正确,导致启动时无法启动。
Failed to create session. An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.***' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name '.cms.presentation.w1elcome.presentation.WelcomeActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
可以尝试使用
adb shell dumpsys activity | grep realActivity
realActivity={com.tencent.androidqqmail/com.tencent.qqmail.launcher.desktop.LauncherActivity}
获取Activiy的方式总结
# windows端:
adb shell dumpsys window windows | findstr mFocusedApp
# mac端:
adb shell dumpsys window windows | grep mFocusedApp
# 其它方法1
adb shell dumpsys window | grep mFocusedApp
# 其它方法2
adb shell dumpsys activity | grep realActivity