Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Webrat & Watir H30 Family common (and some cool) steps as a gem.
Ruby
branch: master

This branch is 21 commits ahead, 63 commits behind richdownie:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
features
lib
spec
.gitignore
README.rdoc
Rakefile
VERSION
cucumber.yml
watircuke.gemspec

README.rdoc

Watircuke

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

Install

Cucumber 0.3.11.6+

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/step_definitions features -t ~watir
watir: CUC_ENV=watir  -r features/support/env.rb features/step_definitions 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.

Something went wrong with that request. Please try again.