美文网首页
Appium(一)环境搭建 - macOS版

Appium(一)环境搭建 - macOS版

作者: 臂力棒在想 | 来源:发表于2017-07-23 15:29 被阅读81次

本文没有安装 Appium Desktop,Appium Server 直接在命令行中进行即可。

  1. Homebrew
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Carthage appium-doctor会检查这一项
    brew install carthage
  3. node
    brew install node
  4. appium
    npm install -g appium,推荐使用淘宝镜像:npm --registry http://registry.npm.taobao.org install -g appium
  5. wd
    npm --registry http://registry.npm.taobao.org install -g wd
  6. appium-doctor
    npm --registry http://registry.npm.taobao.org install -g appium-doctor
  7. Xcode
    App Store上安装时一直转圈,网上找到两种解决方案:一更改 DNS 为114.114.114.114,无效;二是去苹果开发中心下载 Xcode 安装包,一直在官网没找到/(ㄒoㄒ)/~~。发现自己 App Store中 macOS Sierra 需要更新,更新完成后重启电脑,再在 App Store 中下载 Xcode,可以了。
  8. Android SDK
    Android Studio 中文社区有提供独立安装包
  9. 环境变量配置
  10. 新建 ~/.bash_profile 文件
    touch ~/.bash_profile
  11. 在~/.bash_profile文件写入一下内容
export ANDROID_HOME="/usr/local/bin/android-sdk"
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
  1. source ~/.bash_profile
  2. 检查配置环境
➜  ~ appium-doctor
info AppiumDoctor Appium Doctor v.1.4.3
info AppiumDoctor ### Diagnostic starting ###
info AppiumDoctor  ✔ The Node.js binary was found at: /usr/local/bin/node
info AppiumDoctor  ✔ Node version is 8.2.1
info AppiumDoctor  ✔ Xcode is installed at: /Library/Developer/CommandLineTools
info AppiumDoctor  ✔ Xcode Command Line Tools are installed.
info AppiumDoctor  ✔ DevToolsSecurity is enabled.
info AppiumDoctor  ✔ The Authorization DB is set up properly.
info AppiumDoctor  ✔ Carthage was found at: /usr/local/bin/carthage
info AppiumDoctor  ✔ HOME is set to: /Users/yufei
info AppiumDoctor  ✔ ANDROID_HOME is set to: /usr/local/bin/android-sdk
info AppiumDoctor  ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home
info AppiumDoctor  ✔ adb exists at: /usr/local/bin/android-sdk/platform-tools/adb
info AppiumDoctor  ✔ android exists at: /usr/local/bin/android-sdk/tools/android
info AppiumDoctor  ✔ emulator exists at: /usr/local/bin/android-sdk/tools/emulator
info AppiumDoctor  ✔ Bin directory of $JAVA_HOME is set
info AppiumDoctor ### Diagnostic completed, no fix needed. ###
info AppiumDoctor 
info AppiumDoctor Everything looks good, bye!
info AppiumDoctor

相关文章

网友评论

      本文标题:Appium(一)环境搭建 - macOS版

      本文链接:https://www.haomeiwen.com/subject/blkmkxtx.html