Skip to content

For simplifying migrating of Seleniumrc_fu Rails plugin tests to Webrat

License

Notifications You must be signed in to change notification settings

sidane/seleniumrc_fu_webrat_mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seleniumrc_fu Webrat Mapper

For simplifying migrating of Seleniumrc_fu Rails plugin tests to Webrat tests without an extensive rewrite.

Extends Webrat modules to map various Seleniumrc_fu API methods to their Webrat equivalent.

Not a complete set of mappings, but can be easily extended.

Usage

Require ‘seleniumrc_fu_webrat_mapper’ after ‘webrat’.

Update your seleniumrc_fu tests to use Webrat and the mapper will enable you to use (some of) the seleniumrc_fu API without rewriting to the Webrat API.

Simplified example:

require File.dirname(__FILE__) + "/../test_helper"
require "webrat"
require "seleniumrc_fu_webrat_mapper"

Webrat.configure do |config|
  config.mode = :selenium
end

class SampleTest < ActionController::IntegrationTest

  def test_user_can_login
    open "/login"
    assert_text_present 'Please login'
    type "email", "joe@example.com"
    type "password", "my_password"
    click_and_wait "Login"
    assert_text '//div[@id="flash_notice"]', 'Welcome back Joe!'
  end

end

Copyright © 2009 Niall Mullally, released under the MIT license

About

For simplifying migrating of Seleniumrc_fu Rails plugin tests to Webrat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages