須要配置Appium的啓動相關參數:
官網超詳細參數配置及其含義shell
iOS配置:xcode
{ "platformVersion": "11.2.6", "deviceName": "iPhone", "platformName": "iOS", "udid": "手機udid", "bundleId": "APP bundleid", "automationName": "XCUITest", "xcodeSigningId": "iPhone Developer", "xcodeOrgId": "10位校驗碼", "showIOSLog": "true", "preventWDAAttachments": "false" }
啓動成功界面:app
Android配置:spa
{ "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
則:code
appPackage:com.Qunar appActivity:com.mqunar.hy.browser.HyMainActivity
啓動成功界面:orm