inspector元素定位[wda-facebook]

一、前言:

  wda-facebook驱动WebDriverAgent且启动app,使用的wda-facebook地址:https://github.com/appium/WebDriverAgent.git ,我用的是xcode11.6,xcode10会报错。

  但是https://github.com/appium/WebDriverAgent.git已经废弃了inspector的功能。想要使用inspector进行元素定位可以下载安装其他版本的WebDriverAgent,例如我使用的是https://github.com/facebookarchive/WebDriverAgent,xcode版本是xcode10.1,有使用过xcode11.6和xcode13.1都有不同程度的报错。最后安装了xcode10.1,可以正常运行。 

二、安装运行:

  git clone https://github.com/facebook/WebDriverAgent.git,在WebDriverAgent目录下执行./Scripts/bootstrap.sh,打开WebDriverAgent.xcodeproj,Scheme选择WebDriverAgentRunner,Product->Test。具体的可以参考https://www.cnblogs.com/lucylu/p/13425572.html,运行在Simulator机上,比真机上更好定位元素。 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

在浏览器中输入http://172.25.67.82:8100/inspector

 

posted @ 2020-09-04 11:15  拂晓lu  阅读(556)  评论(0编辑  收藏  举报