Watir On Rails plugin

Plugin details

Watir is a simple open-source library for automating web browsers. It allows you to write tests that are easy to read and easy to maintain. It is optimized for simplicity and flexibility.

Websitehttp://watir-on-rails.rubyforge.org/ Repositorysvn://rubyforge.org/var/svn/watir-on-rails Author Dave Hoover Tags Test LicenseBSD

Documentation

Install the plugin:
ruby script/plugin install svn://rubyforge.org/var/svn/watir-on-rails
require File.dirname(__FILE__) + '/../test_helper'

class SuccessfulLoginTest < Test::Unit::TestCase
  include WatirOnRails

  # Defaults to localhost:3000
  server "10.2.32.142"
  port 8053

  fixtures :users

  def test_successful_login
    browser = open_browser
    browser.goto("/login")
    name = users(:dave).name
    browser.text_field(:name, "user[name]").set(name)
    browser.password(:name, "user[password]").set("test")
    browser.button(:name, "login").click
    assert_select "div#banner", /Welcome #{name.capitalize}/
    browser.close
  end
end

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 year ago