码迷,mamicode.com
首页 > 移动开发 > 详细

Appium 环境搭建 - macOS

时间:2017-07-31 10:51:21      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:span   php   rar   for   index.php   jdk   file   security   complete   

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

  1. Homebrew,macOS 包管理器: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 。
  2. Carthage,appium-doctor 会检查这一项: brew install carthage 。
  3. node & npm,nodejs: 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. 环境变量配置:
    1. 新建 ~/.bash_profile 文件: touch ~/.bash_profile 。
    2. 在 .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 
    3. 执行 .bash_profile,使环境变量生效:source ~/.bash_profile 。
  10. 检查配置环境
    ?  ~ 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

标签:span   php   rar   for   index.php   jdk   file   security   complete   

原文地址:http://www.cnblogs.com/bilibang/p/7261852.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!