高手的存在,就是让服务10亿人的时候,你感觉只是为你一个人服务......

获取appPackage和appActivity

目录
  1. 1. 获取appPackage和appActivity

Appium Desired Capabilities中有两个重要的参数:appPackage和appActivity。

capabilities.setCapability(“appPackage”,”xxx”);
capabilities.setCapability(“appActivity”,”xxx”);


获取appPackage和appActivity

打开APP,使用adb命令:

adb logcat |grep Displayed

1
2
3
12-17 21:32:24.461   562   584 I ActivityManager: Displayed com.android.launcher3/.Launcher: +1s38ms
12-17 21:34:12.577 562 584 I ActivityManager: Displayed io.appium.settings/.Settings: +573ms
12-17 21:34:16.470 562 584 I ActivityManager: Displayed com.android.calculator2/.Calculator: +719ms

appPackage:com.android.calculator2

appActivity:.Calculator