ok, I get the answer in forum how to do this, here is the answer :

def jsAlert(button, waitTime = 3) 
w = WinClicker.new 
longName = $ie.dir.gsub("/" , "\\" ) 
shortName = w.getShortFileName(longName) 
c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} 
#{waitTime} " 
puts "Starting #{c}" 
w.winsystem(c) 
w=nil 
end 

Then, before the button you want to click that generates the popup, add 
in: 
jsAlert("OK", 3) 
ie.button(:name, "woohoo").click # This is the button you want to 
click that generates the popup
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5857&messageID=16453#16453
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to