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

DownloadDialogsHandler Error and Time Out

3 Answers 105 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
marco
Top achievements
Rank 2
marco asked on 04 Mar 2014, 11:08 PM
After I have tried almost everything I need a help from Telerik to solve or find a valid workaround for the bug in DownloadDialogsHandler.
The application/test is very very basic and simple. I'm using the latest version of Testing Framework, with IE 11 on Windows7. The browser is enabled to download any file w/out restrictions.
Here is the code:


2.string saveLocation = System.IO.Path.Combine("C:\\Users\\Developer\\Downloads", "DownloadedFile_1.zip");
3.DownloadDialogsHandler handler = new DownloadDialogsHandler(myManager.ActiveBrowser, DialogButton.SAVE, saveLocation, myManager.Desktop);
4.Element downloadBtn = myManager.ActiveBrowser.Find.ByExpression(new HtmlFindExpression("type=submit", "value=download","name=m"));
5.myManager.ActiveBrowser.Actions.Click(downloadBtn);
6.handler.WaitUntilHandled();
7.myManager.ActiveBrowser.NavigateTo("https://agenziaentrate.gov.it/CloseSessions");


after a certain amount of time, the following exception is raised on line 6:
Timed out waiting '60000' msec. for any dialog to be handled '1'

If I specify WaitUntilHandled(20000), obviously the exception is raised after 20s: Timed out waiting '20000' msec. for any dialog to be handled '1'
In several post Telerik team says that this line is needed, but it raise always an exception, (but the file is correctly downloaded), and the execution is break.

If I remove it, as it should be from the telerik official documentation, the DownloadDialogHandler is not correctly managed, and it is terminated before having the time to save the file on the local hard disk.

The file I'm trying to download is around 10KB, so we're talking of extra small files...




DownloadDialogsHandler
DownloadDialogsHandler

3 Answers, 1 is accepted

Sort by
0
Velin Koychev
Telerik team
answered on 10 Mar 2014, 09:33 AM
Hello Marco,

I am sorry to hear that  you are experiencing this issue.

Unfortunately I don't have access to your application and I can't reproduce this issue against other public websites. 

Can you try to reproduce this issue with Telerik Testing Framework 2013.2.1417 that you can download from here

If you still reproduce the same issue, could you please try reproducing the problem against another public application?  This problem reminds me about this bug from our feedback portal, but unfortunately we are still not able to reproduce it locally. 

Looking forward to hearing from you.

Regards,
Velin Koychev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Wai
Top achievements
Rank 1
answered on 10 Jun 2015, 09:39 AM

Any update to this problem?

I am using v.2014.4.1326 and experienced the same problem. File saved fine but exception occurred 

System.TimeoutException: Timed out waiting '15000' msec. for any dialog to be handled '1'

++++++++++++++++

DownloadDialogsHandler dialog = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.SAVE, @"c:\test.xls", Manager.Desktop);

Manager.DialogMonitor.Start();
 //Dialog triggered just before this step

dialog.WaitUntilHandled(15000);

Manager.DialogMonitor.Stop();

0
Ivaylo
Telerik team
answered on 15 Jun 2015, 05:53 AM
Hello,

Using the latest version of Test Studio I was not able to reproduce this behavior, make sure you upgrade to the latest and give it a try.

If you still continue experiencing the behavior provide the test with access to the application so we can take a look.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
marco
Top achievements
Rank 2
Answers by
Velin Koychev
Telerik team
Wai
Top achievements
Rank 1
Ivaylo
Telerik team
Share this question
or