步驟:
1.下載ruby的安裝包:http://www.ruby-lang.org/zh_CN/downloads/
下載Windows一步安裝版,默認(rèn)安裝(需要安裝在系統(tǒng)所在盤,如:C盤)
安裝成功可以運(yùn)行命令查看版本:ruby –v
RUBY程序測(cè)試
2.安裝watir(網(wǎng)絡(luò)安裝)
1、運(yùn)行命令先更新gem:gem update –system
2、運(yùn)行命令安裝watir: gem install watir
安裝成功后在Ruby193lib
ubygems1.9.1gems有watir
3.更新已安裝的gem
運(yùn)行命令先更新gem:gem update
4. https://github.com/oneclick/rubyinstaller/wiki/development-kit下載
下載安裝devkit-tdm....exe,雙擊解壓縮
切換到此目錄下執(zhí)行ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
gem install watir
安裝watir-webdriver
在cmd窗口鍵入下面命令進(jìn)行watir-webdriver安裝
5. WatirRecorder++(watir腳本錄制工具,可選)
1、安裝.net framework 1.1版本:
下載地址:http://download.microsoft.com/download/7/b/9/7b90644d-1af0-42b9-b76d-a2770319a568/dotnetfx.exe
2、安裝WatirRecorder++
下載:http://www.hanselman.com/blog/content/binary/WatirRecorder_Setup_lite.msi
6. 安裝IE Developer Toolbar(IE插件,可選)
下載地址:http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en