【Appium 环境搭建 - macOS】学向勤中得,萤窗万卷书。这篇文章主要讲述Appium 环境搭建 - macOS相关的知识,希望能为你提供帮助。
本文没有安装 Appium Desktop,Appium Server 直接在命令行中进行即可。
- Homebrew,macOS 包管理器: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 。
- Carthage,appium-doctor 会检查这一项: brew install carthage 。
- node & npm,nodejs: brew install node 。
- appium:npm install -g appium,推荐使用淘宝镜像 npm --registry http://registry.npm.taobao.org install -g appium 。
- wd: npm --registry http://registry.npm.taobao.org install -g wd 。
- appium-doctor: npm --registry http://registry.npm.taobao.org install -g appium-doctor 。
- Xcode:App Store上安装时一直转圈,网上找到两种解决方案:一更改 DNS 为114.114.114.114,无效;二是去苹果开发中心下载 Xcode 安装包,一直在官网没找到/(ㄒoㄒ)/~~。发现自己 App Store中 macOS Sierra 需要更新,更新完成后重启电脑,再在 App Store 中下载 Xcode,可以了。
- android SDK:Android Studio 中文社区有提供独立安装包。
- 环境变量配置:
- 新建 ~/.bash_profile 文件: touch ~/.bash_profile 。
- 在 .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
- 执行 .bash_profile,使环境变量生效:source ~/.bash_profile 。
- 检查配置环境
?~ 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
推荐阅读
- WiMAX基站射频功率扩大 满足在3.8GHz运行
- Android适配方案小结
- android Activity的onPause()与onResume()
- Android 6.0及以上版本号的执行时权限介绍
- Android-BroadcastReceiver具体解释
- Android中XML文件的序列化生成与解析
- 国家集训队2011]happiness(吴确)
- 使用清华大学开源软件镜像AOSP的“每月更新初始化包”更新指定版本的Android源码
- Android系统源代码