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:
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...
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:
1.
myManager.ActiveBrowser.NavigateTo(
"https://agenziaentrate.gov.it/Service/DownloadFile.do?tipo=/T/TM/SUOP_"
);
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...