Bug #1140
closedParsing error gives method_missing a nonexistant method name
Description
=begin
This does not happen consistently but I have seen it about 5 times.
My operating system is Windows Server 2003 SP2.
my code: def method_missing method_name, *params
method_name.inspect is :backgroundColor=
Maybe I dont understand how method names are represented, but I thought the method name should be "backgroundColor" or "=" but not the concat of both.
Parsing fails in element.rb, which I attached:
def highlight(set_or_clear)
if set_or_clear == :set
begin
@original_color ||= style.backgroundColor
style.backgroundColor = @container.activeObjectHighLightColor
rescue
@original_color = nil
end
else # BUG: assumes is :clear, but could actually be anything
begin
style.backgroundColor = @original_color unless @original_color == nil
rescue
# we could be here for a number of reasons...
# e.g. page may have reloaded and the reference is no longer valid
ensure
@original_color = nil
end
end
end
...my code...:238:in method_missing' c:/ruby/rubyinstalled/lib/ruby/gems/1.8/gems/watir-1.5.3/./watir/element.rb:194: in
highlight'
c:/ruby/rubyinstalled/lib/ruby/gems/1.8/gems/watir-1.5.3/./watir/element.rb:227:
in click!' c:/ruby/rubyinstalled/lib/ruby/gems/1.8/gems/watir-1.5.3/./watir/element.rb:209: in
click'
...my code...
=end
Files