Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Add support for Watir (http://github.com/watir/watir) in Rails.
Ruby Logos
Branch: master

Run specs before actually releasing. It seems that Bundler has change…

…d it's rake tasks and is doing something in different order than before.
latest commit 9337e214b4
@jarmo jarmo authored

README.md

Watir::Rails

Gem Version Build Status Coverage

This gem makes the Watir work with Rails.

Installation

Add this code to your Gemfile:

group :test do
  gem "watir-rails"
end

Usage

Just use Watir like you've always done in your requests/integration tests:

browser = Watir::Browser.new
browser.goto home_path
browser.text_field(name: "first").set "Jarmo"
browser.text_field(name: "last").set  "Pertman"
browser.button(name: "sign_in").click

Ignore Rails Exceptions

By default, exceptions raised by Rails application will be re-raised in your tests making them to fail.

This feature is only enabled when config.action_dispatch.show_exceptions is set to false in your Rails configuration.

You can disable it in watir-rails by ignoring exceptions:

Watir::Rails.ignore_exceptions = true

Limitations

  • When using Rails path/url helpers in your tests then always use path instead of url methods, because latter won't work!

Contributors

License

See LICENSE.

Something went wrong with that request. Please try again.