Mac Appium环境搭建

  1. 安装brew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  1. 安装java
brew install java
  1. 安装python3 及相关包
brew install python3
pip install selenium
pip install appium-python-client
  1. 安装git, nodejs
brew install git
brew install nodejs
  1. 配置cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
  1. 安装appium
sudo cnpm install appium -g
  1. 安装appium-doctor
sudo cnpm install appium-doctor -g
  1. 安装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
  1. 安装xcode
  • 从应用中心下载安装
  • 安装完启动Xcode并安装组件
  • 修改xcode-select路径与xcode app一致
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
  1. 安装andorid sdk
  1. 配置环境变量
    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 指定文件)

  1. 下载安装appium-desktop
    https://github.com/appium/appium-desktop/releases/

    更多学习资料请加添加作者微信:lockingfree获取

Mac Appium环境搭建

上一篇:原生js实现无缝轮播图


下一篇:每任务-苹果应用市场隐私政策