Appium appium 1.6.6 for mac 安装教程

nore · June 30, 2017 · Last by 浅浅 replied at July 26, 2017 · 1224 hits

一.环境配置
1:安装homebrew,建议***
ruby -e "$(curl --insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2:安装成功后,使用brew命令安装git(已安装,请跳过)
brew install git
3:使用brew 安装node和npm
brew install node
4:输入 "npm -v" 来测试是否成功安装.
5:安装完node以后最好安装一个cnpm,cnpm是淘宝用来替代npm的一个国内镜像工具,执行下面的命令即可
npm install -g cnpm --registry=https://registry.npm.taobao.org
二:卸载之前appium版本
npm uninstall -g appium
三:新建一个工程文件夹,用于放 从github上下载appium的源码
cd <工程文件夹地址>
cd Appium
git clone https://github.com/appium/appium.git
四:进入子目录appium,使用npm安装appium
cd appium
npm install
五:安装之后要与系统进行关联,执行如下命令 npm link
npm link
六:安装appium-xcuitest-driver依赖 进入WebDriverAgent安装目录。运行bootstrap
cd /Users/junchao/Documents/appium/appium/node_modules/appium-xcuitest-driver/WebDriverAgent (如果WebDriverAgent 所在路径和此不同,请自行查找)
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh
注意:在运行sh ./Scripts/bootstrap.sh很可能会有因为咱们大中华局域网而网络连接失败
再次运行sh ./Scripts/bootstrap.sh 无报错就OK了
注意二:如果发生Carthage 未安装错误 ,可以单独去安装Carthage,具体可参考(http://www.jianshu.com/p/52dff4cef8a2
七:之后的步骤参考https://testerhome.com/topics/6962 这个文章 11步以后

共收到 1 条回复 时间 点赞

楼主,我运行到第五步报了这样错误
IOS137:appium admin$ npm link
npm WARN prepublish-on-install As of npm@5, prepublish scripts are deprecated.
npm WARN prepublish-on-install Use prepare for build steps and prepublishOnly for upload-only.
npm WARN prepublish-on-install See the deprecation note in npm help scripts for more information.

appium@1.6.6-beta.3 prepublish /Users/admin/Desktop/gsy/appium
gulp prepublish

[11:18:38] Using gulpfile ~/Desktop/gsy/appium/gulpfile.js
[11:18:38] Starting 'prepublish'...
[11:18:38] Starting 'clean'...
[11:18:38] Finished 'clean' after 34 ms
[11:18:38] Starting 'transpile'...
[11:18:40] Finished 'transpile' after 1.96 s
[11:18:40] Starting 'fixShrinkwrap'...
Could not find shrinkwrap; skipping fixing shrinkwrap. (Original error: Cannot find module './npm-shrinkwrap.json')
up to date in 22.608s
/usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js
/usr/local/lib/node_modules/appium -> /Users/admin/Desktop/gsy/appium
在线等,请指教

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up