This is a real machine automation project to help you sleep early.
- brew install pillow
- brew install homebrew/science/opencv
- pip install --pre --upgrade atx
- This can only run on Mac
- Get Developer Apple ID
- Get latest Xcode and commond line tools
- git clone https://github.com/facebook/WebDriverAgent.git
- Open WebDriverAgent in Xcode and change the sign configuration
- Connect your devices by USB
- You should have Homebrew
- Type in terminal: brew install usbmuxd
- Type in terminal: brew install ios-webkit-debug-proxy
- run WebDriverAgent test in Xcode
- Type in terminal: iproxy 8100 8100 $(idevice_id -l)
- Set up atx.connect('http://localhost:8100')
- Run automation script
- Install this APK to your phone
- Connect your devices by USB
- Set up atx.connect()
- Run automation script
- brew install pillow
- brew install homebrew/science/opencv
- pip install --pre --upgrade atx
- 首先你要有个Mac
- 然后要有苹果开发者账号,详情请看:https://developer.apple.com/
- 安装最新Xcode,查看版本详情,保证这个版本可以cover你手机的IOS版本. 如果想用命令行跑的话,再安装对应版本的Command Line Tools:https://developer.apple.com/download/more/
- git clone https://github.com/facebook/WebDriverAgent.git
- 用Xcode打开刚才下载的项目,用你的开发者账号对项目重签名,步骤请参考这篇文章中的配置WebDriverAgent部分。
- 先在模拟器跑起来:Scheme设置为WebDriverAgentRunner,Simulator设置为iPhone 6,Product->Test。能看到SeverURL就表示成功了。
- 然后连接真机,Device设置为真机,Product->Test * 或者用命令行:xcodebuild -project [项目完整地址]/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=$(idevice_id -l)" test
- 国行版iPhone需要安装iproxy:
- brew install usbmuxd
- brew install ios-webkit-debug-proxy
- 运行iproxy:iproxy 8100 8100 $(idevice_id -l)
- 在浏览器中打开:http://localhost:8100/inspector ,确保可以看到真机屏幕
- 进入Sleep-Early目录,首先:python start_ios.py ,然后App不关,可以跑其他脚本。
- 安装网易mumu模拟器
- 直接运行:
- python explore.py
- python break.py
- python group.py
- IOS问题可以在下班时间找我。Android真机问题请自行解决,我没有Android设备。
- 有bug可以告诉我,心情好的时候会修。