At 08:07 PM 7/25/2005, Hue Mach Dieu wrote:
Hi
I define click popup method like this:
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
__FILE__
require 'watir'
require 'watir/WinClicker'
include Watir
def startClicker( button , waitTime = 0.5)
w = WinClicker.new
longName = $ie.dir.gsub("/" , "\\" )
shortName = w.getShortFileName(longName)
c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button
} #{waitTime} "
puts "Starting #{c}"
w.winsystem(c )
w=nil
end
#Then I call it...
startClicker ("OK", 3)
#Then I click the button that produces the popup.
ie.frame("rightframe").frame("search").button(:name, "Submit").click
but I get the error like this
../Util/clickPopup.rb:8:in `startClicker': undefined method `dir' for
nil:NilClass (NoMethodError)
Thank for help
This error message is telling you that $ie is nil. I'm not sure what you
are trying to do with $ie.dir.gsub...
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general