少一点问别人为什么,多一点问自己凭什么。我是范范,我为自己代言!

Mac配置appium

上一篇 / 下一篇  2019-05-27 11:02:42 / 个人分类:环境搭建

转自:
https://blog.csdn.net/powerccna/article/details/83317510
1. 安装brew

首先确认下mac系统下有没有安装brew, 执行下面命令,如果有对应版本输出,表示已经安装了brew. (brew不知道是什么的同学请自行google)

bash-3.2$ brew --version
Homebrew 1.7.6
Homebrew/homebrew-core (git revision 3e5f; last commit 2018-10-01)
 如果没有安装brew的话,执行下面命令:

bash-3.2$ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. 安装node.js

bash-3.2$ brew install node
3. 安装cnpm,

国外很多网站被墙了,下载速度也很慢,安装了cnpm后,后面所有的npm命令都可以用cnpm来代替,下载的软件包源也是从淘宝源里面下载,下载会很6

bash-3.2#npm install -g cnpm --registry=https://registry.npm.taobao.org
4. 安装Appium:

bash-3.2#cnpm install -g appium
5. 安装Andriod SDK:

假设JDK安装配置已经完成,Andriod SDK的安装配置,网上太多了,大家 google一下解决。 需要注意的是环境变量是用户目录下的.zshrc 文件,有些人的系统是在.bash_profile, 哪个不存在直接做个软连接(ln -s ),把2个当成一个,一下都解决了

6. 安装appium-doctor:

bash-3.2#cnpm install –g appium-doctor
7. 运行appium-doctor,确认环境安装全部成功,如果有X的,一个个去解决,大多数是环境变量配置的问题。如下图所示,全部都是勾的话,恭喜你,安装成功

# appium-doctor
info AppiumDoctor Appium Doctor v.1.5.0
info AppiumDoctor ### Diagnostic starting ###
info AppiumDoctor  ✔ The Node.js binary was found at: /usr/local/bin/node
info AppiumDoctor  ✔ Node version is 10.7.0
info AppiumDoctor  ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
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: /var/root
info AppiumDoctor  ✔ ANDROID_HOME is set to: /Users/name/Library/Android/sdk
info AppiumDoctor  ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
info AppiumDoctor  ✔ adb exists at: /Users/name/Library/Android/sdk/platform-tools/adb
info AppiumDoctor  ✔ android exists at: /Users/name/Library/Android/sdk/tools/android
info AppiumDoctor  ✔ emulator exists at: /Users/name/Library/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
7. 安装appium python客户端:

bash-3.2#pip install Appium-Python-Client
 

Appium的安装(推荐):也可以通过安装.dmg文件来实现,同时包含了appium 图像界面启动方式(前面第4步的安装方式,只能命令行的方式启动appium server

dmg程序下载地址:

官方下载:http://appium.io/

国内下载:http://pan.baidu.com/s/1jGvAISu (由testerhome提供的)


TAG:

 

评分:0

我来说两句

Open Toolbar