由于網絡的問題,用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