Next Generation Functional Testing Tool
Watir (Web Application Testing in Ruby) is a great functional testing framework for web applications. However, newcomers often have difficulties. If you do, you may find this useful.
TestWise Rubyshell is a pre-packaged Watir software on Windows platform.
Download latest RubyShell installer, double click rubyshell-1.x.x-setup.exe to
install, accept all default options.
(Default to c:\rubyshell)
You are ready to run Watir scripts. Start a Window command window,
cd C:\rubyshell\samples\watir ruby google_watir.rb
Double click C:\rubyshell\samples\watir_rspec\demo.bat
Install Ruby (recommending v1.8.7) using the one-click installer for Windows.
Start a Windows command window (if you are unfamiliar with this, you'd better try TestWise IDE)
gem install watir
If you behind a firewall and need proxy to access Internet,
gem install -p http://proxy_server:proxy_port watir
Open notepad, paste into the text below,
require 'watir' browser = Watir::IE.start("http://google.com") browser.text_field(:name, "q").set "Watir IDE" browser.button(:name, "btnG").clickthen save as c:\google_watir.rb
Start a Windows command window,
cd C:\ ruby c:\google_watir.rbto run the watir test script you just created, which will start an Internet Explorer window: doing a google search.
Create, edit, manage and run Watir/RWebSpec test scripts in single tool.
Download free TestWise Community Edition installer, double click TestWise-1.x.x-setup.exe to install, accept all default options.
You may launch TestWise after the installation (default)
Or start up normally
TestWise will load the sample project if it is first time.
If not, close current project, click menu File -> Open Project, then choose c:\Program File\TestWise\samples\demo-watir\demo-watir.tpr project file.
Select the file hello_world_watir.rb on the left, the test script will be opened in the editor.
Right mouse click in the editor, select 'Run Ruby script'
An Internet Explorer will be started to run the Watir script.