Selenium Testing plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://svn.viney.net.nz/things/rails/plugins/selenium_testing
Tests are written in the same way as unit and functional tests. The method calls in the test (click, type, assert_visible etc... ) correspond to Selenium commands/assertions. See the Selenium documentation for a full listing of available commands/assertions. You can NOT use Test::Unit assertions (assert, assert_equal etc...), you must use Selenium assertions.
class PersonSeleniumTest < Test::Unit::TestCase fixtures :people, :households def setup open :controller => 'person', :action => 'view', :id => 1 end def test_add_new_person click 'add_new_person_link' assert_visible 'add_new_person' type 'new_person_first_name', 'Pixel' type 'new_person_last_name', 'the Cat' select 'new_person_gender', 'Male' click_and_wait 'submit_add_new_person' assert_text 'person_name', 'Pixel the Cat' end def test_household people(:jonathan).householders.each do |householder| assert_visible "householder_#{householder.id}" end end end
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: hardway, 9 months ago

