Watir is a Ruby browser-driver suitable for apps in any language.
Ruby JavaScript C++ C
Permalink
Failed to load latest commit information.
lib Add Element#inner_html and Element#outer_html Apr 15, 2016
spec
.gitignore
.gitmodules
.rspec add RSpec config for colored output Dec 6, 2011
.yardopts Remove VERSION from documentation. Aug 18, 2012
CHANGES Update release date Apr 21, 2016
CONTRIBUTORS.txt
Gemfile Loosen up RAutomation dependency. Mar 9, 2013
LICENSE
README.rdoc
Rakefile Make sure that specs are run before release. May 10, 2013
VERSION deprecate watir-classic Aug 6, 2016
watir-classic.gemspec

README.rdoc

Watir Classic

Status

Watir Classic is now deprecated. Please use Watir 6.0+ which is based on Selenium. Update your dependencies to use “watir”, “~> 6.0”

Details

Watir Classic is a Watir driver for automating Internet Explorer on Windows.

Project Home

watir.com

Documentation

rubydoc.info/github/watir/watir-classic/frames

Source Code

github.com/watir/watir-classic

Support

watir.com/support

Gem

rubygems.org/gems/watir-classic

Install

Install the gem:

gem install watir-classic

Detailed installation instructions are at watir.com/installation

Examples

Some examples from watir.com/examples

Loading Watir gem to drive Internet Explorer on Windows

require 'watir-classic'

Starting a new browser & going to our site

browser = Watir::Browser.new
browser.goto("http://bit.ly/watir-example")

Setting a text field

browser.text_field(:name => "entry.0.single").set "Watir"

Setting a multi-line text box

browser.text_field(:name => "entry.1.single").set "I come here from Australia. \n The weather is great here."

Setting and clearing a radio button

browser.radio(:value => "Watir").set
browser.radio(:value => "Watir").clear

Setting and clearing check boxes

browser.checkbox(:value => "Ruby").set
browser.checkbox(:value => "Python").set
browser.checkbox(:value => "Python").clear

Clicking a button

browser.button(:name => "logon").click

Clearing, getting and selecting selection list values

browser.select_list(:name => "entry.6.single").clear
puts browser.select_list(:name => "entry.6.single").options.map(&:text)
browser.select_list(:name => "entry.6.single").select "Chrome"

Clicking a button

browser.button(:name => "submit").click

Checking for text in a page

puts browser.text.include?("Your response has been recorded.")

Checking the title of a page

puts browser.title == "Thanks!"

Supported Platforms

Watir-Classic is supported on Ruby 1.8.7, 1.9.3 and 2.0.0. It should work on Internet Explorer 8, 9 and 10.

Let us know at Watir’s Mailing List or through Issues if there's any problems.