Hi All, I am newbie in Ruby/ WATIR and am struggling for the past 4 days with a slightly uncommon problem.
The application I am trying to automate has a feature of exporting the data table in .csv format. I use following function to save that exported .csv file: def SaveFileCorrectOne(filepath) ai = WIN32OLE::new('AutoItX3.Control') prompt_message = "Do you want to open or save this file?" window_title = "File Download" sleep 5 ai.WinWaitActive(window_title,prompt_message,1) ai.ControlFocus(window_title, prompt_message, "&Save") ai.ControlClick(window_title,prompt_message,4427) ai.WinWaitActive("Save As","Save &in",2) ai.ControlSetText("Save As","Save &in",1148,filepath) ai.ControlClick(window_title,prompt_message,"&Save") ai.WinWait("Save As", "Save &in", 5) ai.ControlClick("Save As", "Save &in","&Save") ai.WinActivate("Save As","") ai.ControlFocus("Save As", "", "&Yes") ai.ControlClick("Save As", "", "&Yes","left") ai.WinWait("Download complete", "", 1) ai.ControlClick("Download complete", "", "Close") end On IE 6, when this function is executed, the export process proceeds in the following manner: 1. Export Button is clicked. 2. Save As dialog box appears (and behind this dialog box appears a blank IE window.) 3. On saving the file (.csv file), the 'Download Complete' box is visible (and in the background the blank IE window is also visible). 4. On clicking the 'Close' button on the 'Download Complete' box, the box closes but the window doesn't close, and this hangs the script. On IE7, when the Export button is clicked, an IE window flashes and disappears, and the script moves ahead to the next task. The export of the .csv file doesn't take place. In other words, the SaveFile function never gets called. Can anyone please, please help me. Regards, Asheesh -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com