If you have autoit installed, then you can create a small script which look for the window title and the button.
As soon as that titles window is there, it will clck the button. Sample may be like : ############ require 'win32ole' begin autoit = WIN32OLE.new('AutoItX3.Control') loop do sleep(30) autoit.ControlClick("Microsoft Office Outlook",'', 'OK') autoit.ControlClick("Security Information",'', '&Yes') autoit.ControlClick("Security Alert",'', '&Yes') sleep(20) end Send("{SPACE}") rescue Exception => e puts e end ############ Have this script runing when you run your script. Bhavesh On Apr 30, 10:13 am, Chuck van der Linden <sqa...@gmail.com> wrote: > consider moving to watir-webdriver perhaps? > > > > > > > > On Sunday, April 29, 2012 10:19:33 PM UTC-7, AQUA wrote: > > > No I have been using, WATIR. And the issue I m facing is; basically I have > > been able to handle the popup using some of the examples available on WATIR > > wiki. But only with click_no_wait. Whenever I use fire_event the the > > javascript is executed but the execution flow stuck until I manually click > > the ok button. Hence the flow never enters the section of the code that is > > used for handling pop-up without manual interference. > > > Thanks & Regards, > > Manav > > > On Friday, April 27, 2012 1:37:34 PM UTC+5:30, Željko Filipin wrote: > > >> On Fri, Apr 27, 2012 at 8:42 AM, AQUA <manavkbgu...@gmail.com> wrote: > >> > I have been working on WATIR for sometimes, but finding issues in > >> handling Java Script pop-ups. > > >> If you are using watir-webdriver, this could help: > > >>http://watirwebdriver.com/javascript-dialogs/ > > >> Željko > >> -- > >> watir.com/book - author -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com