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 _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general