hi, U can use this code
def startClicker( 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 of function StartClicker end u have to call startClicker function before that object who is responsible for popup like as:- startClicker("OK",3) $ie.button(:name,"button responsible for popup") u also can use this code too:- def start_jsalert_clicker Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") } end u have to change ur windowhelper.rb file as... def push_alert_button @autoit.WinWait "Window Internet Explorer", "" text = @autoit.WinGetText "Window Internet Explorer" file = File.open("c:\\test.txt", "w") file.puts text puts text.to_s file.close @autoit.Send "{ENTER}" end This code will also give u the text on the popup tell me if this does not work u have to use start_jsalert_clicker before that button which is responsible for popup. Regards Shalini On 5/9/07, vamsi <[EMAIL PROTECTED]> wrote:
My application having confirmation messages as "Pop up dialogue box". the application will not move to next page until you click on 'OK' button. the popup winodw will be like this.. -------------------------------------------------------------------- Windows intrenet explorer ------------------------------------------------------------------ Some information OK button Cancel ------------------------------------------------------------------- My Script is not recognising my instruction to click this button. Can any one help me to solve this problem? Thanks in Advance. Regards vamsi _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general