This is a migrated thread and some comments may be shown as answers.

IE9 Download File Dialog Issue

5 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 19 Aug 2013, 03:38 PM
I am on version 2012.2.1022.0.  The download dialog in IE9 is causing me issues and I need to either save as or cancel.

I have read other threads related to this issue and the solutions don't seem to help.  DownloadDialogsHandler does not seem to be recognized for me in Telerik. 

I have tried inserting this code in a custom script:

ArtOfTest.WebAii.Win32.Dialogs.DownloadDialogsHandler downloadDialog = new DownloadDialogsHandler(ActiveBrowser,
DialogButton.SAVE, "C:\\PQZHoldings.csv", Manager.Desktop);
   
HtmlAnchor a =    Find.ByExpression<ArtOfTest.WebAii.Controls.HtmlControls.HtmlAnchor>("id=ctl00_MainPageLeft_MainPageContent_ExportHoldings1_LinkButton1", "tagname=a");
   
a.Click(false);
   
downloadDialog.WaitUntilHandled(10000);

When this is inserted, I receive the following error:
 Line 92: (CS0246) The type or namespace name 'DownloadDialogsHandler' could not be found (are you missing a using directive or an assembly reference?)
Line 93: (CS0103) The name 'DialogButton' does not exist in the current context

From what I have read in the forums, I thought this was built in to telerik.  Do I need an assembly?

Thanks,

Jonathan

5 Answers, 1 is accepted

Sort by
0
Velin Koychev
Telerik team
answered on 20 Aug 2013, 09:22 AM
Hello Jonathan,

I am sorry to hear you are running into this problem.

Just add the following using statement and this should fix the issue:

using ArtOfTest.WebAii.Win32.Dialogs;
I hope this helps.

Regards,
Velin Koychev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Jonathan
Top achievements
Rank 1
answered on 20 Aug 2013, 08:11 PM
That worked, however, I'm still having problems.  The file gets saved after clicking a button, but the wait for the dialog portion times out. 

System.TimeoutException: Timed out waiting '60000' msec. for any dialog to be handled '1' at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount) at ArtOfTest.WebAii.Win32.Dialogs.DownloadDialogsHandler.WaitUntilHandled(Int32 timeout)




string saveLocation = string.Format("cla-{0:HH-mm-ss}.pdf", DateTime.Now);
  
Manager.DialogMonitor.Start();
  
//Create dialogs
DownloadDialogsHandler dialog = new DownloadDialogsHandler(ActiveBrowser, DialogButton.SAVE, @"C:\" + saveLocation, Manager.Desktop);
  
// Click 'Cph1OKButtonSubmit'
Pages.ClaimsOutcomeAdvisor9011.Cph1OKButtonSubmit.Click(false);
  
ActiveBrowser.WaitForAjax(30000);
  
System.Threading.Thread.Sleep(3000);
  
dialog.WaitUntilHandled(60000);
  
Manager.WaitForNewBrowserConnect("/CaseNotebook/BiAssessmentSummary.aspx", true, 60000);
0
Velin Koychev
Telerik team
answered on 23 Aug 2013, 01:00 PM
Hello Jonathan,

I am sorry to hear that this problem still exists. 

in order to help you best, we will need some more information:
1) Please provide us with a copy of your test and if it is possible, grant us access to your application so we can reproduce the issue on our end and give you a solution. 
If direct access is not possible, capture a Fiddler trace and attach it to this support ticket in a zip file. If you are unfamiliar with how to do so, this link will provide you with step-by-step instructions for download and use. Please make sure to enable 'Decrypt HTTPS traffic' and 'Store binaries' options (see attached image) before starting capture.

2) A Jing video demonstrating the issue may also help us to better understand what is happening.

Looking forward to hearing from you.

 

Regards,
Velin Koychev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Jonathan
Top achievements
Rank 1
answered on 27 Aug 2013, 07:25 PM
I have attached the fiddler trace. 
0
Mario
Telerik team
answered on 30 Aug 2013, 04:42 PM
Hello Jonathan,

Please allow me to interject and assist with this issue while Velin is our of the office.

Unfortunately the Fiddler trace file you provided is corrupt in some way, Fiddler is not able to load the recorded sessions. Please try once more to provide us with a usable trace.

One more suggestion I would like you to try before sending us a new trace is to set the unexpected dialog action to 'DoNotHandle' with one line of code at the beginning of your sample:

Settings.Current.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;

Regards,
Mario
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Velin Koychev
Telerik team
Jonathan
Top achievements
Rank 1
Mario
Telerik team
Share this question
or