WebDriverAgent

1安装Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2、安装carthage:

brew install carthage

3、安装python:

brew install python

4安装node:

brew install node
5克隆WebDriverAgent到本地

git clone https://github.com/facebook/WebDriverAgent

6、切换到WebDriverAgent目录,执行:

cd ./WeDriverAgent/

//执行脚本

./Scripts/bootstrap.sh

7、xcode使用
 

因为安装到真机上都是需要证书签名的,需要先在xcode中设置账号。


如果是免费版的个人证书,还需要修改下WebDriverAgent的BundleID,主要不和别人的重名就行。【】注意不仅要改Lib,runner下的BundleId也要改【】 



z运行与测试

到此,基本环境就搭建好了,为了验证是否能够真正的运行,下面进行简单的运行测试。 


最后运行 Product ->Test选项,一切正常的话,手机上会出现一个无图标的WebDriverAgent应用。


测试WebDriverAgent

打开浏览器safari,在地址栏输入:127.0.0.1:8100/inspector 回车 看到 下图说明正确。 


8、ATX安装和使用

pip install --pre --upgrade atx
pipinstall opencv_python

python脚本:

import atx

d = atx.connect('http://localhost:8100', platform='ios')

print d.status()

 

 

 

官方文档:

https://github.com/facebook/WebDriverAgent/wiki/Queries


端口开发:

brewuninstall ideviceinstaller -g
brew uninstall libimobiledevice -g
brew install --HEAD libimobiledevice -g
brew install ideviceinstaller -g
sudo chmod -R 777 /var/db/lockdown


设置代理:

把当前链接的iOS设备端口转发到MacOS的端口

iproxy8100 8100

完成后,可以使用http://localhost:8100/status查看是否返回JSON

http://localhost:8100/inspector访问

 


  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值