I've been building a harness for running watir tests it looks lke this
currently-

module CVLibrary
    def CVLibrary.cv_login(testinstance, testaddress, testuser,
testpass, testldap)
      # opens ie, goes to Central Vision and logs in with the
    # specified address, username, password and domain
     testinstance.goto(testaddress)
     testinstance.frame("main").text_field(:name,
"username").set(testuser)
     testinstance.frame("main").text_field(:name,
"password").set(testpass)
     testinstance.frame("main").select_list(:name,
"ldapDir").select(testldap)
     testinstance.frame("main").button(:name, "Login").click
  end



The test script includes the following
require 'watir'
require 'test/unit/assertions'
require 'CVlibrary'

include Test::Unit::Assertions

ie = Watir::IE.start()

CVLibrary.cv_login(ie,'http://address.html','name','pass','domain')


What I don't understand is why, in the module, I'm explicitly having to
pass in it's own name? e.g. CVLibrary.cv_login

None of the examples

-- 
Posted via http://www.ruby-forum.com/.