Mac + iOS UI自动化


WebDriverAgent编译安装

Xcode_13_beta_5
Command_Line_Tools_for_Xcode_13_beta_5
Appium-mac-1.21.0
教程:
    https://www.cnblogs.com/zdx20/p/15085742.html

brew 安装

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
国内源:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

安装依赖包

brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice

brew install node # install npm
brew install ios-deploy
npm install -g authorize-ios 
brew install ideviceinstaller
brew install ios-webkit-debug-proxy
brew install carthage
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=00008101-0004242A18E1401E" test

如果上面有报错,根据报错安装相应的依赖模块,如果依赖安装不成功找相应源码包安装在执行命令
tidevice/facebook-wda
sudo pip3 install -U tidevice 
sudo pip3 install -U facebook-wda

wda教程:
    https://github.com/openatx/facebook-wda
tidevice教程:
    https://testerhome.com/topics/27758
  https://cloud.tencent.com/developer/article/1858108
 真机调试教程:
  https://docs.gondolatest.com/mobile-testing-guide/setup-ios-environment-real-device.html#install-required-dependencies-for-real-devices

运行

$ tidevice xctest -B com.qdyxmas.WebDriverAgentRunner.xctrunner
#后面的可以使用tidevice applist查询得到
$ python start.py

https://www.mdnice.com/writing/4e97216fd50442898ad2d0c6c7e71ed9 https://www.cnblogs.com/fnng/p/12616466.html https://www.mdnice.com/writing/4e97216fd50442898ad2d0c6c7e71ed9