appnium 【配置启动信息】
哈喽,大家好!我是大O小众
今天和大家分享的是关于appnium 【配置启动信息】
deviceName
获取当前设备号
方法一:adb devices
adb devices
activity
获取程序 activity
方法一
adb shell dumpsys activity activities
方法二:获取正在活动的activity栈
adb shell dumpsys activity activities | sed -En -e '/Running activities/,/Run #0/p'
方法三:获取当前显示在顶层的activity
adb shell dumpsys window | grep mFocusedApp
方法四:只打印activity信息
- linux:
adb shell dumpsys activity | grep "mFocusedActivity"
- windows:
adb shell dumpsys activity | findstr "mFocusedActivity"
方法五:打印activity堆栈信息
adb shell dumpsys activity top
方法六:进入adb shell中查找
-
cmd命令中输入:adb shell 进入shell命令模式
-
shell中输入:logcat | grep ActivityManager 真机运行应用,可以实时 查看当前正在运行的Activity;
cmp=com.tencent.mm.ui.LauncherUI
其中:com.tencent.mm.ui 是包名, LauncherUI 是当前活动的activity;
方法七:shell monkey
adb shell mokey -p 【包名】 -v 1
cmp=com.tencent.mm.ui.LauncherUI
其中 :com.tencent.mm.ui 是包名, LauncherUI 是当前活动的activity;
方法八:shell package
adb shell dumpsys package 【包名】
cmp=com.tencent.mm.ui.LauncherUI
其中 :com.tencent.mm.ui 是包名, LauncherUI 是当前活动的activity;
对于这篇文章大家如果有其他不清楚的可以私信或者评论的方式告知我,后续我会在这个文章中添加
我希望这个文档可以帮助到你