14 posts, 2 answers
1. ##### Zach
33 posts
Member since:
Sep 2014

Posted 28 Oct 2014 Link to this post

I'm trying to use TTF to handle a file download in IE 11.

I tried following this guide, but it seems to only work with the older versions of IE.

https://social.msdn.microsoft.com/Forums/getfile/469201
2. ##### Boyan Boev
1072 posts

Posted 31 Oct 2014 Link to this post

Hi Zach,

Please send us the code you are using for handling the dialog.

A Jing video of the behavior may also help us diagnose your issue.

Looking forward to hearing from you.

Regards,
Boyan Boev
Telerik

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings

3. ##### Zach
33 posts
Member since:
Sep 2014

Posted 31 Oct 2014 in reply to Boyan Boev Link to this post

I am using Telerik Testing Framework, not the studio.

with ab being my active browser.

Is this code supposed to work?

I'm unsure of how these download dialogs are supposed to work. Do I run the "man.DialogMonitor.AddDialog(ieDownload);" line before or after IE is prompting me for the download?

I am not allowed to show you video of the site as it is proprietary.

##### Boyan Boev
1072 posts

Posted 03 Nov 2014 Link to this post

Hi Zach,

Please try out this code:

DownloadDialogsHandler dialog = new DownloadDialogsHandler (Manager.ActiveBrowser, DialogButton.SAVE, @"D:\text.txt", Manager.Desktop);

Manager.DialogMonitor.Start();

Element.Click(false); //Trigger the dialog.

dialog.WaitUntilHandled(30000);

Let me know if this helps.

Regards,
Boyan Boev
Telerik

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings

5. ##### Zach
33 posts
Member since:
Sep 2014

Posted 04 Nov 2014 in reply to Boyan Boev Link to this post

That did the trick! Thank you very much.
6. ##### Boyan Boev
1072 posts

Posted 05 Nov 2014 Link to this post

Hello Zach,

I am happy to hear that.

If you need additional assistance please let us know.

Regards,
Boyan Boev
Telerik

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings

7. ##### Zach
33 posts
Member since:
Sep 2014

Posted 12 Nov 2014 in reply to Boyan Boev Link to this post

I'm bumping this post for more help with this.

The code you gave me works, sometimes. About half of the time the the "save as" window appears and is closed without entering a filename/saving the file. this causes dialog.waitUntilHandled() to throw an exception.

Do you have any idea why this may be?
8. ##### Boyan Boev
1072 posts

Posted 17 Nov 2014 Link to this post

Hi Zach,

Could you please try adding this code as the first row:

UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle

Another option is put some wait after triggering the dialog.

Give that a try and let me know the results.

Regards,
Boyan Boev
Telerik

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings

9. ##### Zach
33 posts
Member since:
Sep 2014

Posted 17 Nov 2014 in reply to Boyan Boev Link to this post

Could you clarify what I am supposed to do with that line of code? It is not valid on its own.
10. ##### Boyan Boev
1072 posts

Posted 18 Nov 2014 Link to this post

Hello Zach,

Please try putting it before the code which handles the dialog:

UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
DownloadDialogsHandler dialog = new DownloadDialogsHandler (Manager.ActiveBrowser, DialogButton.SAVE, @"D:\text.txt", Manager.Desktop);

Manager.DialogMonitor.Start();
Element.Click(false); //Trigger the dialog.
dialog.WaitUntilHandled(30000);

Let me know if this helps.

Regards,
Boyan Boev
Telerik

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings

11. ##### Zach
33 posts
Member since:
Sep 2014

Posted 18 Nov 2014 in reply to Boyan Boev Link to this post

UnexpectedDialogAction is a type and cannot be assigned to, are you sure that is the correct line of code?
##### Boyan Boev
1072 posts

Posted 18 Nov 2014 Link to this post

Hi Zach,

Please excuse me, the row should be:

Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;

Let me know if this helps.

Regards,
Boyan Boev
Telerik

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings

13. ##### Zach
33 posts
Member since:
Sep 2014

Posted 18 Nov 2014 in reply to Boyan Boev Link to this post

Thanks that seems to do the trick!
14. ##### Boyan Boev
1072 posts

Posted 20 Nov 2014 Link to this post

Hi Zach,

I am happy to hear that.

Regards,
Boyan Boev
Telerik

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings