I am attempting to automate an export scenario. our web app has a trigger that launches a second browser that triggers the download dialog.
I have used the 3 part method of handling IE8 dialogs (saveAsDialog, IEDownloadDialog, and IEDownloadCompleteDialog) and had it working about 1/2 dozen times. And then it stopped working. I tried changing the code to use just the DownloadDialogsHandler method. Same results.
Nothing in this area of our app has changed to make this stop working.
What I see happening is that when the download is triggered a second IE8 browser pops, (then the download dialog is suppose to appear) however, the browser that pops is closed before the dialog gets a chance to appear.
If someone could see where I went wrong, or has an idea as to why the thing isn't working anymore I would appreciate it.
the simpler method of using the DownloadDialogsHandler (that I've not seen work at all) was used as
the code I've used (and saw working a few times) is as follows
I have used the 3 part method of handling IE8 dialogs (saveAsDialog, IEDownloadDialog, and IEDownloadCompleteDialog) and had it working about 1/2 dozen times. And then it stopped working. I tried changing the code to use just the DownloadDialogsHandler method. Same results.
Nothing in this area of our app has changed to make this stop working.
What I see happening is that when the download is triggered a second IE8 browser pops, (then the download dialog is suppose to appear) however, the browser that pops is closed before the dialog gets a chance to appear.
If someone could see where I went wrong, or has an idea as to why the thing isn't working anymore I would appreciate it.
the simpler method of using the DownloadDialogsHandler (that I've not seen work at all) was used as
DownloadDialogsHandler exportDownload = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.SAVE, fileSave, Desktop);Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;Manager.DialogMonitor.Start();HtmlControl exportSelectCSV = new HtmlControl(Find.ByAttributes("class=~SiteExportLink"));exportSelectCSV.Click();exportDownload .WaitUntilHandled(); if (File.Exists(fileSave + "export.csv"))
{ File.Delete(fileSave + "export.csv"); } SaveAsDialog saveExport = new SaveAsDialog(ActiveBrowser, DialogButton.SAVE, fileSave + "export.csv", Desktop); Manager.DialogMonitor.AddDialog(saveExport); IEDownloadDialog ieDialog = new IEDownloadDialog(ActiveBrowser, DialogButton.SAVE, Desktop); Manager.DialogMonitor.AddDialog(ieDialog); IEDownloadCompleteDialog dlComplete = new IEDownloadCompleteDialog(ActiveBrowser, DialogButton.CLOSE, Desktop); Manager.DialogMonitor.AddDialog(dlComplete); Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle; Manager.DialogMonitor.Start(); HtmlControl exportSelectCSV = new HtmlControl(Find.ByAttributes("class=~SiteExportLink")); exportSelectCSV.Click(); ieDialog.WaitUntilHandled(); saveExport.WaitUntilHandled(); dlComplete.WaitUntilHandled();