= WatirSplash

* Web: http://github.com/jarmo/WatirSplash
* Author: Jarmo Pertman (mailto:jarmo.p[at]gmail.com)

== DESCRIPTION

WatirSplash makes browser-based web page testing in Ruby splashin' easy.
It combines Watir (http://www.watir.com) for controlling the browser and
RSpec (http://rspec.info) for testing framework. This powerful combination gives you
the ability to write easily well-maintained and easy-to-read specs (specifications in RSpec) so
you don't need to have any extra documentation for your applications.

WatirSplash makes it easier to use best features of both of these tools together so
you won't have to spend time on thinking how to do that yourself - you can start
testing right away!

== SYNOPSIS

=== With vanilla Watir and RSpec
    require 'watir'
    require 'spec'

    describe "Google" do
        before :all do
            @browser = Watir::Browser.new
            @browser.maximize
            @browser.goto "http://google.com"
            @browser.url.should =~ /google/
        end

        it "has search field" do
            text_field = @browser.text_field(:name => "q")
            text_field.should exist
            text_field.should be_visible
        end

        it "performs search" do
            @browser.text_field(:name => "q").set "Bing"
            @browser.button(:name => "btnG").click
            @browser.text.should include("Bing")
        end

        after :all do
            @browser.close
        end
    end



=== With WatirSplash
    describe "Google" do
        before :all do
            goto "http://google.com"
            url.should =~ /google/
        end
        
        it "has search field" do
            text_field = text_field(:name => "q")
            text_field.should exist
            text_field.should be_visible
        end
        
        it "performs search" do
            text_field(:name => "q").set "Bing"
            button(:name => "btnG").click
            text.should include("Bing")
        end
    end
    
    C:\project\ui-test>spec spec\google_spec.rb
    Results will be saved into the directory C:/project/ui-test/results
    Google
      has search field
      performs search

    Finished in 6.782388 seconds

    2 examples, 0 failures

== INSTALL

1) install Ruby 1.8.6:
    http://rubyinstaller.org/
    
2) install ImageMagick with rmagick-win32 gem for saving the screenshots in PNG format:
    http://rubyforge.org/frs/?group_id=12&release_id=42049

3) install WatirSplash:
    gem install watirsplash

4) in your project's directory:
    watirsplash generate

== WHAT NEXT?

You can read more information about the usage and features from the wiki at http://github.com/jarmo/WatirSplash/wiki

== COPYRIGHT

Copyright © 2010 Jarmo Pertman. See LICENSE for details.