Appium启动iOS-&&-Android自动化

需要配置Appium的启动相关参数:
官网超详细参数配置及其含义

iOS配置:

{
  "platformVersion": "11.2.6",
  "deviceName": "iPhone",
  "platformName": "iOS",
  "udid": "手机udid",
  "bundleId": "APP bundleid",
  "automationName": "XCUITest",
  "xcodeSigningId": "iPhone Developer",
  "xcodeOrgId": "10位校验码",
  "showIOSLog": "true",
  "preventWDAAttachments": "false"
}

Appium启动iOS-&&-Android自动化

Appium启动iOS-&&-Android自动化

启动成功界面:
Appium启动iOS-&&-Android自动化

Android配置:

{
  "platformName": "Android",
  "deviceName": "MI_5s_Plus",
  "newCommandTimeout": 180,
  "udid": "设备号",
  "appActivity": "要启动的 Android acticity",
  "appPackage": "包名",
  "autoGrantPermissions": true
}

appActivity和appPackage可通过
adb shell dumpsys activity activities
命令行获取

例如结果中含有:cmp=com.Qunar/com.mqunar.hy.browser.HyMainActivity
则:

appPackage:com.Qunar
appActivity:com.mqunar.hy.browser.HyMainActivity

Appium启动iOS-&&-Android自动化

启动成功界面:
Appium启动iOS-&&-Android自动化

相关推荐