Mac下安装及配置Appium环境
Mac下安装及配置Appium环境
我是小白,自己研究appium好几周了。
一开始按照同事这篇文章设置Mac下的环境,http://www.cnblogs.com/tangdongchu/p/4432808.html
因为当时在命令行端没能用npm install安装成功,而只是安装了appium的dmg程序,平时用appium.app端也够了。但是后续因为需求http://testerhome.com/topics/2616,发现得用命令行调用appium,所以今天再努力一把,用命令行把appium安装成功。
今天参考了这几篇文章的步骤安装appium
http://testerhome.com/topics/1322
http://testerhome.com/topics/315
首先,官方网站上给出的安装的教程,颇为简单:
> brew install node # get node.js
> npm install -g appium # get appium
> npm install wd # get appium client
> appium & # start appium
> node your-appium-test.js
但,只是看着简单而已,自己搭建的过程中可能会遇到各种问题
brew install node 想要生效首先必须先安装homebrew才行,所以第一步应当是检查自己是否已经安装homebrew
在终端中输入brew -v 如果出现版本信息则说明已经安装
➜ ~ brew -v
Homebrew 0.9.5
在终端输入brew install node 命令安装node.js 安装完成后在终端输入node -v命令检查是否安装成功,出现版本信息说明安装成功
➜ ~ node -v
v0.10.35
在终端输入npm uninstall appium -g,因为被墙,下不下来,即使连接VPN也各种下不下来~
使用其他人推荐的这个镜像,还是下不下来,花了好长时间,还是不成功,真的好郁闷
npm --registry http://registry.cnpmjs.org install -g appium
后来,找到这篇文章http://testerhome.com/topics/1827
推荐taobao的npm镜像,下载速度较快,墙裂推荐使用!
npm --registry http://registry.npm.taobao.org install -g appium
npm 安装好 Appium 好之后,可以运行下 appium-doctor,检查自己的各种环境变量是否配置成功

➜ ~ 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 "/Applications/adt-bundle-mac-x86_64-20131030/sdk"
JAVA_HOME is set to "/System/Library/Frameworks/JavaVM.framework/Home."
ADB exists at /Applications/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb
Android exists at /Applications/adt-bundle-mac-x86_64-20131030/sdk/tools/android
Emulator exists at /Applications/adt-bundle-mac-x86_64-20131030/sdk/tools/emulator
Android Checks were successful.

npm install wd 这个也是下载不了,目前不知道是什么东东,不影响就先不管了
在终端输入 appium& 即可启动appium,在这里多说一句,直接输入 appium 也可以启动appium,只是加个&可以显示appium的pid,而不加则不会显示

➜ ~ appium&
[2] 3679
➜ ~ warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
info: Welcome to Appium v1.4.3 (REV a357c7fa73222315dd85c3d2dd8334767cca1b0d)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug

命令行启动appium之后,如果关闭终端,隔一会你要再运行,会提示error
➜ ~ appium
warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
error: Couldn't start Appium REST http interface listener. Requested port is already in use. Please make sure there's no other instance of Appium running already.
因为端口被node占用呢,可以用如下退出node
➜ ~ pkill node
[2] 3679 exit 143 appium
也可以用之前自己的笨办法
知道可以查询4723端口找到PID,然后kill -9 PID
mac&linux下查看端口被哪个进程占用
mac : lsof -i:8080
linux : neststat -anltp | grep 8080
➜ ~ lsof -i:4723
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 3679 XXXXX 12u IPv4 0xaecf7b4424b87de7 0t0 TCP *:4723 (LISTEN)
Mac下安装及配置Appium环境的更多相关文章
- MAC下安装与配置MySQL
MAC下安装与配置MySQL MAC下安装与配置MySQL 一 下载MySQL 访问MySQL的官网http://www.mysql.com/downloads/ 然后在页面中会看到“MySQL ...
- 64位Win7下安装与配置PHP环境【Apache+PHP+MySQL】
[软件下载] 本安装实例所使用安装文件如图所示: 其中,64位版本的MySQL安装文件mysql-5.5.33-winx64.msi,可直接从官网下载,下载地址:http://dev.mysql.co ...
- Mac下安装和配置mongoDB
mac下的mongodb下载安装比较简单,主要有两种方式,一种是下载压缩包解压,另一种是通过npm或者homebrew命令安装,这里就不赘述了, 复杂的在于mongodb运行环境的配置(若未配置运行环 ...
- 如何在windows下安装与配置Appium
appium是一款open source 移动自动化测试框架,既支持Android 也支持IOS 工具/原料 JDK adt-bundle-windows node python appium rob ...
- Mac下安装与配置Go语言开发环境
1.官网下载安装包(需FQ) https://storage.googleapis.com/golang/go1.7.darwin-amd64.pkg 2.配置Go环境变量GOPATH和GOBIN ( ...
- Mac下安装及配置Eclipse
1.安装Eclipse前先确认你的Mac上是否已安装java运行环境.进入终端,输入”java -version”,如果返回了java版本号则说明已安装,否则,请先安装java运行环境: 2.访问ec ...
- mac下安装及配置tomcat
mac下的软件不像windows下的程序那样写注册表,对于tomcat的安装来说,在mac下是名符其实的绿色软件,具体操作如下: 1.到 apache官方主页 下载完整 tar.gz文件包.(没有专门 ...
- 32位Win7下安装与配置PHP环境(二)
本安装实例中用到的三个软件,都可以直接从官网下载,为了方便,也可以直接从本人的CSDN资源中打包下载. 三个安装文件如图示: CSDN高速下载地址: http://download.csdn.net/ ...
- 32位Win7下安装与配置PHP环境(一)
运行PHP网站,主要需要安装.配置三个软件,Apache.PHP和MySQL.如果需要编辑调试PHP程序,还要安装一个编辑调试软件. 一. Apache Apache是和IIS类似的一个软件,是运行在 ...
随机推荐
- 【点分治】2019 首尔 icpc Gene Tree
题目 链接:https://ac.nowcoder.com/acm/contest/15644/B来源:牛客网 A gene tree is a tree showing the evolution ...
- 关于Aborted connection告警日志的分析
前言: 有时候,连接MySQL的会话经常会异常退出,错误日志里会看到"Got an error reading communication packets"类型的告警.本篇文章我们 ...
- Introduction to x265 Rate Control Algorithm
The rate control in x265 is the same as x264's implementation, which is mostly empirical. It include ...
- C++ primer plus读书笔记——第1章 预备知识
第1章 预备知识 1. Ritchie希望有一种语言能将低级语言的效率.硬件访问能力和高级语言的通用性.可移植性融合在一起,于是他在旧语言的基础上开发了C语言. 2. 在C++获得一定程度的成功后,S ...
- shell中的 “.”和source export
在shell脚本里面export的环境变量,在set里面竟然看不到.为什么在shell脚本里面用export设置环境变量之后,当shell执行完了,用set命令看不到呢?但是你如果直接在终端里expo ...
- [bug] Nginx:src/os/unix/ngx_user.c:36:7: 错误:‘struct crypt_data’没有名为‘current_salt’的成员
参考 https://blog.csdn.net/yu_pan_love_cat/article/details/103035513 https://www.cnblogs.com/hxlinux/p ...
- 【转载】CentOS 7自动以root身份登录gnome桌面 操作系统开机后自动登录到桌面 跳过GDM
CentOS 7自动以root身份登录gnome桌面 ################### #cd /etc/gdm ]# cat custom.conf# GDM configuration st ...
- mysql 配置文件概述
mysql 配置文件概述 mysql 配置文件 mysql 的配置文件为 /etc/my.cnf 配置文件查找次序:若在多个配置文件中均有设定,则最后找到的最终生效 /etc/my.cnf --> ...
- spec2006与spec2000的对比简要说明
ec2006使用说明 2014-10-10 五 性能测试 benchmark 一.工具介绍 SPEC CPU 2006 benchmark是SPEC新一代的行业标准化的CPU测试基准套件.重点测试 ...
- /etc/ssh/sshd_config ssh自动断 cent7
vim /etc/ssh/sshd_config ClientAliveInterval 60ClientAliveCountMax 8630000 ClientAliveInterval 30Cli ...