1.下載最新版本
https://github.com/appium/appium-inspector/releases
2.本地啟動一個Appium服務
若Android SDK已安裝Appium服務,則在任意terminal使用appium啟動服務即可
3.Appium Inspector客戶端配置連接到Appium服務
Configuring and Starting a Session - Appium Inspector
配置樣例
{"platformName": "Android","appium:appPackage": "ai.edalearning.app","appium:appActivity": "com.nd.smartcan.appfactory.demo.SplashActivity","appium:automationName": "UiAutomator2","appium:noReset": false }
踩坑:appActivity被寫成androidActivity,導致服務器一直返回500,查看服務器窗口發現報錯日志 定位到該問題
[AndroidUiautomator2Driver@1405] The following provided capabilities were not recognized by this driver:
[AndroidUiautomator2Driver@1405] ? androidActivity