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

IE8: Download Dialog issues with Data Driven tests

3 Answers 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 05 Jan 2012, 08:45 PM

In IE8 with all settings configured as per the Telerik documentation.
* i.e. the 'Close download when complete' checkbox is UNCHECKED.

* The ReuseAppWindow property of the test is set to 1.

I am running a test that logs into and navigates a site using Local Data. The final step includes downloading a file.

The first iteration of the test, using the first row of Local Data, executes perfectly: the download dialog is recognized and handled accordingly (the filepath is entered from the Local Data).

The user is then logged out, the cookies cleared and a new browser window opened for the next run.

The second iteration of the test makes it to the end then fails to recognize the Windows Dialog as a Download Dialog and executes the 'Unexpected dialog' process instead (which fails the test).

This happens even when the Local Data is EXACTLY THE SAME in both rows.

3 Answers, 1 is accepted

Sort by
0
Accepted
Cody
Telerik team
answered on 06 Jan 2012, 11:19 PM
Hi,

I have confirmed this is a bug in Test Studio. I have filed a bug report on it here. As a temporary work around you can implement 100% in code the dialog handling. I recommend using the DownloadsDialogHandler as shown near the bottom of that page. This will work in your scenario. 

All the best,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Benjamin
Top achievements
Rank 1
answered on 13 Apr 2012, 05:35 PM
I am experiencing a similar issue. I just upgraded my Test Studio on Wednesday to the 2012.1 release that came out on that day. I am using script step as you mentioned above as I am using variables in the file name when saving from my data source. However, if my test has more than one step using DownloadDialogsHandler, the second and subsequent steps time out and don't download any file at all. But, when I use the Download Dialog Handler from the menu, the script succeeds without error. I also created tests that do not have data binding and the scripted method would fail in the same way while the handler option would succeed as they did with data binding.
0
Byron
Telerik team
answered on 17 Apr 2012, 09:55 PM
Hi Benjamin,

The behavior you mention is due to a design limitation: Test Studio will not handle multiple dialogs of the same type in the same test using the Download Dialog Handler from the Quick Tasks menu.

Your issue could be resolved by using data driven download dialog handlers from the menu and splitting the two dialog handlers into their own tests so that there is only one download dialog handler step in each test. Then, you can combine them using Test as Step or a Test List.

Alternatively if you prefer to stick with your coded approach, you are probably missing a cleanup step in your code. When you are finished using the download dialog in your code, make sure that the dialog handler is removed with code similar to this:

Manager.DialogMonitor.RemoveDialog(dlg);  // dlg is the DownloadDialogsHandler that was previously added

All the best,
Byron
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Cody
Telerik team
Benjamin
Top achievements
Rank 1
Byron
Telerik team
Share this question
or