一、Appium Inspector地址:Releases · appium/appium-inspector · GitHub
appium inspector打开报错解决方法:
1、Control+Click the Appium Inspector icon in the Applications Finder folder and choose Open.
2、You'll be presented with the dialog below. Just click Open and Appium Inspector should launch.
二、启动appium,默认端口是4723:
【注意】appium inspector不可以单独启动,需要先启动appium server
三、设置Capabilities:
【注意】appium:deviceName仅对指定iOS模拟器使用,真机上使用udid
四、启动Apoium Inspector - Start Session,这一步正在安装指定路径下的应用:
【注意】如果手机本地没有安装WebDriverAgent,启动时报如下错误:
五、安装完成后启动成功,可以定位元素了:
【注意】如果在Capabilities中指定appium:app,那么在定位元素的时候只能定位到该app中的元素,不能定位到系统元素。
【注意】如果想定位到全部元素,包括系统元素和被测app的元素,那么就不指定appium:app