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

Handling Save File dialogs in IE9

3 Answers 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ory
Top achievements
Rank 2
Ory asked on 28 Sep 2012, 09:20 AM
Hi there,

I have searched for an answer but all I could find were examples using code - I wanted to know if it is possible to do not using code.

I can get Test Studio to save the file, but is there a way to verify the file? e.g. that download was successful?

I am also encountering the following problems:
1) When setting the "Handle 'Download' dialog." step to HandleButton = RUN or OPEN, in both cases it saves the file but then the step fails on time out - not sure if a defect? this is on the latest Test Studio release. (similarily when recording an Open action and then running the step).

2) When recording a "Save and Open" action it is recorded as "CANCEL"

3) When executing a "CANCEL" action it executes the same as a SAVE and also fails on time out.

Some of those are demonstrated in the following video capture: 
http://screencast.com/t/QabIv7ypz

Regards,
Ory Zaidenvorm

3 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 03 Oct 2012, 12:24 PM
Hello Ory,

Regarding your question about the verification of the downloaded file, you don't have to build an additional verification, the way how this is working is Test Studio pass on the next step right after the download is complete. That is why we require the browser to be configured to notify when the download is complete (see this screenshot).
Regarding the problems you encounter I am not able to reproduce the second problem you described: "When recording a "Save and Open" action it is recorded as "CANCEL"" Can you provide public website where this issue is reproducible? 

Regarding issues 1 and 3 I have logged a bug which you can track using this public URL. I've also provided 500 telerik point for reporting this issue.

Thank you for your cooperation.

Greetings,
Ivaylo
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
Viji
Top achievements
Rank 1
answered on 09 Nov 2012, 10:41 PM
Ya I have the same Time out problem here :
string saveLocation = string.Format("Report-{0:HH-mm-ss}.xls"DateTime.Now); 
DownloadDialogsHandler handler = new DownloadDialogsHandler(mymanger.ActiveBrowser, DialogButton.SAVE, @"D:\\Test" + saveLocation, mymanger.Desktop);             
//IEDownloadDialog handler = new IEDownloadDialog(mymanger.ActiveBrowser, DialogButton.SAVE, mymanger.Desktop);
//SaveAsDialog saveExport = SaveAsDialog.CreateSaveAsDialog(mymanger.ActiveBrowser, DialogButton.SAVE, @"D:\\Test" + saveLocation, mymanger.Desktop); mymanger.DialogMonitor.Start();     
mymanger.ActiveBrowser.Actions.InvokeScript("Export()");
handler.WaitUntilHandled(30000);
mymanger.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Enter);
Thread.Sleep(10000);
mymanger.DialogMonitor.Stop();
0
Ivaylo
Telerik team
answered on 13 Nov 2012, 02:22 PM
Hello Viji,

I cannot see the click step calling the dialog handler in the code you have provided. This should be inserted before this line of code:

DownloadDialogsHandler handler = new DownloadDialogsHandler(mymanger.ActiveBrowser, DialogButton.SAVE, @"D:\\Test" + saveLocation, mymanger.Desktop);

Please refer to the screenshot attached and to the highlighted line. I have used your code to reproduce this behavior with a public available download dialog. Here is a short video. Of course this is failing on my side since the file name is not valid which is expected behavior.
Another thing that I noticed in the code provided, I assume this happened while you were pasting the code the following part of the code  is in a comment.

mymanger.DialogMonitor.Start();

Refer to the code you have provided and you will see.

Please note that the issue you are experiencing is not related to the one that the forum thread was opened for. Could you please submit  new issues in different tickets/forum threads since this allow us to keep better track and handle them properly.

Thank you for your understanding. Regards,
Ivaylo
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
Tags
General Discussions
Asked by
Ory
Top achievements
Rank 2
Answers by
Ivaylo
Telerik team
Viji
Top achievements
Rank 1
Share this question
or