I resolved the problem. actually we have to check for the getWindowHandle("Security Alert") in a loop. first time it didn't find the window.
The code i used is - * begin* * wc = WinClicker.new* * hwnd = wc.getWindowHandle("Security Alert")* * if(hwnd == -1) then* * num = 0* * while( num < 1)* * hwnd = wc.getWindowHandle("Security Alert")* * num = num + 1* * end* * end* * if(hwnd != -1) then* * wc.clearSecurityAlertBox()* * startAction "Recived Security Alert", " Click 'Yes' button"* * logPass* * else* * startAction "No Security Alert", "No Action"* * logPass* * end* * rescue => e* * startAction "Security Alert throws exception", "Exception for Security Alert window"* * handleFail e* * end* Now its working. If security Alert window is not present it will not call *wc.clearSecurityAlertBox()* function . Thanks, Amit _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general