前言
Xcode: 保证Xcode 版本在9.0以上但不要高于10.1,当前Appium只支持到10.1。
iPhone:最好是新版本,不要低于9.3。
WDA 安装
第一、git clone https://github.com/facebook/WebDriverAgent.git 或者直接 Download Zip
第二、下载完成后,到此文件所在目录(终端)执行
./Scripts/bootstrap.sh
第三、配置证书。只需配置 TARGETS 中的 WebDriverAgentLib 和 WebDriverAgentRunner 两项
倘若签名不对,则直接去Build Settings 中修改下 Product Bundle Identifier 的值,再回到 General 就好。
第四、菜单栏选择目标设备。
Product —> Destination —-> 我们的设备
Product —> Scheme —-> WebDriverAgentRunner
第五、Product —-> Test
第一遍执行会报错,在手机上信任一下应用,再执行一遍就 👌 啦。