From: Bhavesh Sharma Date: 2008-01-20T22:24:11+09:00 Subject: Winclicker is not clicking the button on pop-up window. Hi, I have to create an script where i have to open an page in IE7. Once page is opened, i have to click the "Delete" button. As soon as i press the "Delete" button, an Windows Internet explorer window [small window] pop up with options "Ok" and "Cancel". But using watir code im not able to click "Ok" button. I have tried writing code like this -- 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 i want to click that generates the popup, added: jsAlert("OK", 3) ie.button(:name, "Delete").click #After clicking this delete button, a pop-up window comes up where i need to click "OK" button. This pop-up window is an modal window i mean im not able to select anything behind this window and it is having a title of "Windows Internet Explorer" I have defined the fuctions sAlert and then immedaitely called it. It starts another DOS window and searc hsomething but bydefault after 30 secs this Dos window gets closed. -- Posted via http://www.ruby-forum.com/.