Hi Joedio, Thanks for the reply. However, may I humbly submit that the titles have been hardcoded deliberately since they are the standard 'Save As', Download Complete' dialog boxes.
Kindly suggest considering the titles as-is. Regards, Asheesh On Fri, Jul 2, 2010 at 3:27 AM, joedio <joe...@comcast.net> wrote: > Asheesh, > > > I see from the code you supplied that when running with IE6 you > are passing to AutoIt one title as a variable... > window_title = "File Download" > ai.WinWaitActive(window_title,prompt_message,1) > > have another title hard coded as "Save As" > ai.WinWait("Save As", "Save &in", 5) > > and another window's title hard coded as "Download complete" > ai.ControlClick("Download complete", "", "Close") > > Have you manually verified that the titles of each those windows are > exactly the > same when opened via IE6 and IE7? > > If they are not identical then you can either add if/then statements, > or perhaps use > regular expressions to identify the windows in a manner that matches > both > IE6 and IE7 titles, to account for that difference. > > Joe > > > > On Jul 1, 10:34 am, asheesh misra <asheeshmisr...@gmail.com> wrote: > > 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<watir-general%2bunsubscr...@googlegroups.com> > -- 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