由于网络的问题,用npm install appium-selendroid-driver会卡在http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/
然后你等几天也不会有一个结果....
用官网指示指定的URL安装是不行的,看了installer.js,url是写死的
没有办法,只好强出去,下载了需要的安装文件,然后模拟http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/
第一步:下载 http://11.gxdx2.crsky.com/200711/WAMP5-v1.7.4.rar 用这个配置http服务器,比较简单,只是临时用一下,所以就用老的版本
默认安装 则会安装到C:\wamp
然修改httpd.conf 路径:C:\wamp\Apache2\conf
假设你的ip是192.168.0.199
在上一个Directory的后面,增加下面一个节点
<Directory "C:/wamp/www/maven2">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
IndexOptions NameWidth=25 Charset=UTF-8
Order Deny,Allow
Deny from all
Allow from all
</Directory>
然后重启wamp
第二步:下载升级需要的文件 我放到百度盘了 http://pan.baidu.com/s/1pLcwFvt
并解压到C:/wamp/www/maven2
第三步:修改hosts文件, 用管理员权限运行
修改C:\Windows\System32\drivers\etc\hosts文件
增加一条
192.168.0.199 repo1.maven.org
然后用ping repo1.maven.org 显示为192.168.0.199后就可以了
第四步:用浏览器打开 http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/ 看有没有 0.17.0这个目录,有那就恭喜
第五步:
npm install appium-selendroid-driver