I have a script which contains class extensions. The Checkbox.test() is 
obviously just a stub right now, but I'm trying to get my head around 
the concept.

#-- contained in classExtensions.rb
module Watir

  class Checkbox < Watir::RadioCheckCommon

    def test(property, expectedResult)
      puts("Checkbox.test()")
    end

  end

end

In another script, I have the following...

require 'watir'
require 'sqlClient'
require 'classExtensions'

.
.
.

ie.checkboxes.each {|cb|
  cb.test("jfkdsajf", "jfkdlas", "jfkdlasjf")
}

However, I'm getting the following error:
#<NoMethodError: private method `test' called for #<Watir::CheckBox>>

What am I doing wrong here?


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