Just about all our scripts include a login.rb module which contains an
include for a mixin 'ModalDialog' which handles clicking the modal dialog
popups. I'll copy in the code for it below. When I try to run a script I
get the following error, which is on the line which does the 'include
ModalDialog'.
C:/Java/workspace/eplan/src
/watir/scripts/simple/product/../../../lib/login/logi
n.rb:8:in `include': wrong argument type Class (expected Module)
(TypeError)
from
C:/Java/workspace/eplan/src/watir/scripts/simple/product/../../../l
ib/login/login.rb:8
You can see an example of this in C:\ruby\lib\ruby\gems\1.8\gems\watir-
1.5.0.945\watir.rb
Most of the example scripts start out
####################
require 'watir
include Watir
#####################
on line 187 (in 1.5.0.945) is the line
module Watir
.
In the source code you're accessing, I am pretty sure that somewhere you
have a line
class ModalDialog
that is causing this error.
Hope that helps.
Here's a little grep replacement that might help you find the offending
file:
require "find"
Find.find("C:\\source\\repository") do |f|
begin
x = File.open(f)
while line = x.gets
if line =~ /ModalDialog/i
puts f
puts line
end #if
end #while
rescue
end #
end #do
-C
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general