目录
环境搭建
- 安装brew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
- 安装java
brew install java
- 安装python3 及相关包
brew install python3
pip install selenium
pip install appium-python-client
- 安装git, nodejs
brew install git
brew install nodejs
- 配置cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
- 安装appium
sudo cnpm install appium -g
- 安装appium-doctor
sudo cnpm install appium-doctor -g
- 安装appium驱动
sudo cnpm install appium-xcuitest-driver
sudo cnpm install appium-uiautomator2-driver
sudo cnpm install opencv4nodejs ffmpeg fbsimctl applesimutils idevicelocation ios-deploy ios_webkit_debug_proxy bundletool.jar
brew install carthage
- 安装xcode
- 从应用中心下载安装
- 安装完启动Xcode并安装组件
- 修改xcode-select路径与xcode app一致
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- 安装andorid sdk
- 下载andorid sdk http://down.tech.sina.com.cn/page/45703.html
- 下载后 启动 tools/android
- 下载 tools/platform-tools/build-tools
- 配置环境变量
vim ~/.bash_profile
export ANDROID_HOME=/usr/local/android-sdk-macosx
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=${JAVA_HOME}/bin:${PATH}
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
source ~/.bash_profile
(遇到权限不足 可以 sudo chmod 777 指定文件)
- 下载安装appium-desktop
https://github.com/appium/appium-desktop/releases/