[Wtr-general] clicking on popup after selecting an item in select list

vikash forum-watir-users at openqa.org
Thu Dec 21 00:40:23 EST 2006


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


More information about the Wtr-general mailing list