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

How to access Save buttons in file download confirm dialogs

1 Answer 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 14 Mar 2014, 03:40 PM
Hello,

I have a few unit tests that I had to introduce pixel based click events to get around not being able to reference the save buttons in the file download control of the browser.

To be more specific, I am referring to when you are being prompted to download a file and depending on the browser it will have a save button, or save as etc.

In my unit tests, I first need to download the CSV file before I can read it in and evaluate some data. The only way I could figure out how to do this is by hard-coding a pixel based click event. After reading online, it appears its impossible by legal means to access the protected and non-exposed controls for the file downloading through the browser via client-side functionality.

Is there any other way to accomplish this?

This testing framework being used is for the ASP.NET MVC 4.5 web application. 

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 19 Mar 2014, 02:25 PM
Hi Robert,

Please check out this article.

It describes in details how to handle a download dialog via code.

Hope this helps.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or