Appium for Mac环境准备篇

简介:
 之前写过一篇 Appium for windows的 文章,因为是09年的T400,启动 Android模拟器的时候死机三次,那就公司申请台Macbook air吧,15寸的Macbook Pro实在太重了,也就Mac才能真正发挥Appium的功能,支持Android和iOS。好了,废话不多,开始。
   1. 爬墙
  因为后续安装过程中可能会碰到墙的问题,所以首先得解决爬墙的问题。
  我的方便,公司提供代理。
   2. java
  guowenxie-macbookair:~ guowenxie$ java -version
  java version "1.8.0_05"
  Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
  Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
   3. git
  guowenxie-macbookair:~ guowenxie$ git --version
  git version 1.8.5.2 (Apple Git-48)
   4. ruby
  guowenxie-macbookair:~ guowenxie$ ruby -v
  ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
   5. brew
  guowenxie-macbookair:~ guowenxie$ brew -v
  Homebrew 0.9.5
  这边提下brew的安装,brew是Mac OS不可或缺的套件管理器
  执行下面命令
  ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
   6. node
  有了brew安装node就方便了
  brew install node
   7. npm
  guowenxie-macbookair:~ guowenxie$ npm -v
  2.0.0-alpha-5
  8. Appium
  现在可以开始安装Appium
  guowenxie-macbookair:~ guowenxie$ appium -v
  1.2.0
   9. wd
  npm install wd
  10. Xcode和Android SDK
  这个不说了
   11. 检查环境
  Appium提供了一个doctor,运行appium-doctor
guowenxie-macbookair:~ guowenxie$ appium-doctor
Running iOS Checks
Xcode is installed at /Applications/Xcode.app/Contents/Developer
Xcode Command Line Tools are NOT installed: Error: Command failed: No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
Fix it  (y/n) y
Press any key to continue:
Xcode Command Line Tools are installed.
DevToolsSecurity is enabled.
The Authorization DB is set up properly.
Node binary found at /usr/local/bin/node
iOS Checks were successful.
Running Android Checks
ANDROID_HOME is set but does not exist on the file system at "Users/guowenxie/Documents/adt-bundle_mac-x86_64-20140702/sdk"
Appium-Doctor detected problems. Please fix and rerun Appium-Doctor.
  这里可以看到我Xcode Command Line Tools没有安装,这个方便,Fix it 的时候输入Y,就能自动导向安装了。
  另一个是ANDROID_HOME的环境变量没配置好,那么我们要配置下。
   12. bash_profile文件
  Mac 默认是没有这个文件的,我们自己建一个
  touch .bash_profile
  vi .bash_profile
  打开bash_profile文件配置ANDROID_HOME和JAVA_HOME
  export ANDROID_HOME="/Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk"
  export JAVA_HOME=$(/usr/libexec/java_home)
  source .bash_profile
  好了,再次运行appium-doctor
guowenxie-macbookair:~ guowenxie$ appium-doctor
Running iOS Checks
Xcode is installed at /Applications/Xcode.app/Contents/Developer
Xcode Command Line Tools are installed.
DevToolsSecurity is enabled.
The Authorization DB is set up properly.
Node binary found at /usr/local/bin/node
iOS Checks were successful.
Running Android Checks
ANDROID_HOME is set to "/Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk"
JAVA_HOME is set to "/usr/libexec/java_home."
ADB exists at /Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb
Android exists at /Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk/tools/android
Emulator exists at /Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk/tools/emulator
Android Checks were successful.
All Checks were successful
  到此,环境基本准备好了。
  最后,如果不想通过命令行安装Appium,也可以安装dmg

最新内容请见作者的GitHub页:http://qaseven.github.io/
相关文章
|
Java 关系型数据库 MySQL
mac,linux环境的基础工具安装【jdk,tomcat】
mac,linux环境的基础工具安装【jdk,tomcat】
171 1
|
Go iOS开发 MacOS
手把手教你在Mac上从零搭建Go语言开发环境
手把手教你在Mac上从零搭建Go语言开发环境
2749 0
|
前端开发 开发工具 git
mac前端开发环境
mac前端开发环境
213 0
|
9月前
|
SQL API 流计算
实时计算 Flink版产品使用合集之在Mac M1下的Docker环境中开启SQL Server代理的操作步骤是什么
实时计算Flink版作为一种强大的流处理和批处理统一的计算框架,广泛应用于各种需要实时数据处理和分析的场景。实时计算Flink版通常结合SQL接口、DataStream API、以及与上下游数据源和存储系统的丰富连接器,提供了一套全面的解决方案,以应对各种实时计算需求。其低延迟、高吞吐、容错性强的特点,使其成为众多企业和组织实时数据处理首选的技术平台。以下是实时计算Flink版的一些典型使用合集。
289 1
|
5月前
|
项目管理 Python
如何在Mac上安装多个Python环境
在你的Mac上使用多个Python环境可以对项目管理很有帮助,特别是在同时处理不同Python版本或不同的包需求时。在这篇文章中,我们将向你展示如何在Mac上轻松地安装和管理多个Python环境。
130 5
 如何在Mac上安装多个Python环境
|
4月前
|
PyTorch TensorFlow 算法框架/工具
手把手教你-MAC笔记本安装Pytorch环境
手把手教你-MAC笔记本安装Pytorch环境
173 0
|
5月前
|
JavaScript Linux Android开发
mac环境下搭建frida环境并连接网易mumu模拟器
这篇文章介绍了如何在mac环境下搭建Frida环境,并详细说明了如何连接网易MuMu模拟器进行动态分析。
304 1
|
4月前
|
Linux C语言 iOS开发
MacOS环境-手写操作系统-06-在mac下通过交叉编译:C语言结合汇编
MacOS环境-手写操作系统-06-在mac下通过交叉编译:C语言结合汇编
68 0
|
9月前
|
Web App开发 小程序 Android开发
Appium微信小程序自动化环境准备
Appium微信小程序自动化环境准备
275 1
|
6月前
|
网络安全 数据安全/隐私保护 iOS开发
【Mac os】如何在服务器上启动Jupyter notebook并在本地浏览器Web端环境编辑程序
本文介绍了如何在服务器上启动Jupyter Notebook并通过SSH隧道在本地浏览器中访问和编辑程序的详细步骤,包括服务器端Jupyter的启动命令、本地终端的SSH隧道建立方法以及在浏览器中访问Jupyter Notebook的流程。
285 0