adb connect 127.0.0.1:端口号,连接模拟器
获取当前activity名称
首先打开被测app,输入命令adb shell dumpsys window | findstr mCurrentFocus
启动被测app,输入命令
>adb shell dumpsys activity activities >E:\aaa.txt
获取 启动activity名称
adb shell
monkey -p com.hpbr.bosszhipin -v -v -v 1
输入adb shell "logcat|grep START"点击待测应用即可
adb devices x8ofrcuwbuorlvce
adb shell getprop ro.build.version.release 11
adb shell dumpsys activity | findstr "mFocusedActivity"
adb shell dumpsys activity activities
com.hpbr.bosszhipin 在一连串的输出中找到Runing activities
sdk 工具 com.hpbr.bosszhipin
{
"platformName": "Android",
"platformVersion": "11",
"deviceName": "x8ofrcuwbuorlvce",
"appPackage": "com.hpbr.bosszhipin",
"appActivity": "com.hpbr.bosszhipin.module.launcher.WelcomeActivity",
"automationName": "UIAutomator2"
}
先启动appium服务
然后运行idea 项目