Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
pages
Rakefile
ReadMe.txt
admin_manage_user_test.rb
adminwise-selenium2-rspec.tpr
buildwise.rake
call_register_test.rb
correspondence_test.rb
event_registrations_admin_test.rb
event_registrations_test.rb
event_test.rb
library_inventory_test.rb
library_lending_test.rb
member_login_test.rb
membership_test.rb
notices_spec.rb
professionals_test.rb
profile_test.rb
run_all_tests.bat
rwebspec_utils.rb
test_helper.rb
testwise_support.rb
user_login_test.rb

ReadMe.txt

Notes on porting Watir to selenium-webdriver

1. Change test_helper, include rwebpec-webdriver

     require 'rwebspec-webdriver'

2. In TestWise's project settings, change test project to to use framework 

3. In after(:all) block, add close_browser, as webdriver-selenium does not reuse existing browser

4. Convert test steps
    # enter_text("name", "007") =>  @browser.find_element(:name, "name").send_keys("007")
    # click_button("Create") => ?

5. Copied some generic test helper methods from RWebSpec, such as
      - try
      - fail_safe
      - debugging?
           
6. Assertion:
    * page_text.should include("Some text") => @browser.page_source.should include("Some text")
    *

Impression
----------

* A lot slower

* Can't find links after styling cases 
    in source 'Control Panel', style to 'CONTROL PANEL'  
    web-driver reads
      "control panel"
* assert_link change to 
    @browser.find_element(:link_text, "logout")

Issues
------

* Unable to click Logout link on AdminWise Page (either by link_text or :id), 
  workaround: visit logout_url directly

Reference
---------
selenium-webdriver Intro: http://code.google.com/p/selenium/wiki/RubyBindings
selenium-webdriver API: http://selenium.googlecode.com/svn/trunk/docs/api/rb/index.html
Something went wrong with that request. Please try again.