No commit activity in last 3 years
No release in over 3 years
Watir steps for cucumber
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Watircuke¶ ↑

Webrat & Watir Family common (and some cool) steps as a gem.

Install¶ ↑

Cucumber

wiki.github.com/aslakhellesoy/cucumber/install

Watir ~ Firewatir ~ Safariwatir

wtr.rubyforge.org/install.html

Use¶ ↑

  • Remove step_definitions/webrat_steps.rb if you have it.

  • In the scenarios you want to run watir, just add the @watir tag before.

  • Run ‘cucumber` for webrat and `cucumber -p watir` for some Watir =D

Rails Sample¶ ↑

cucumber.yml

default: CUC_ENV=webrat -r features/support/env.rb features -t ~watir
watir: CUC_ENV=watir  -r features/support/env.rb features -t  watir

support/env.rb

ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/rails/world'
require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
Cucumber::Rails.use_transactional_fixtures
Cucumber::Rails.bypass_rescue # Comment out this line if you want Rails own error handling

if ENV['CUC_ENV'] == 'watir'
  require 'watircuke'
  Before do
    @environment = "http://localhost:3000/
    sleep 1
  end
  # optional
  # at_exit do
  #   @browser.close
  # end
else
  require 'webrat'
  Webrat.configure do |config|
    config.mode = :rails
  end
  require 'cucumber/rails/rspec'
  require 'webrat/core/matchers'
  require 'webratcuke'
end

ABOUT¶ ↑

**cukewatir maximizes the Gherkin speak and minimizes the Watir code.