From: Kyle Schmitt Date: 2007-09-06T22:52:00+09:00 Subject: Re: Modal dialog is not geting closed second time in RUBY:WATIR Pretty watir specific, so maybe repost to the watir mailing list. The long&short of it is though, modal dialogs are a pain in waitr ;) I've always had to use winclicker for them. If you have a link that brings up the dialog, and the link is stored in the variable @link, something like this should work. def startClicker( button , waitTime = 3) #(copied & edited from various sources), I'd cite but I forget all of them :) 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 startClicker("OK") @link.click --Kyle