0.05
Low commit activity in last 3 years
No release in over a year
Use Watir (http://github.com/watir/watir) in Rails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
>= 0

Runtime

>= 0
>= 3
>= 6.0.0.beta4
 Project Readme

Watir::Rails

Gem Version Build Status Coverage

This gem makes 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.