Alexey Ivanov
Top achievements
Rank 1
Alexey Ivanov
asked on 10 May 2011, 09:14 AM
In the latest version download dialog processing seems to be broken even in older browsers :(
Run this piece of code in IE8:
Run this piece of code in IE8:
[TestFixture]
public
class
Class1
{
[Test]
public
void
A() {
new
Manager(
false
).Start();
var m = Manager.Current;
m.LaunchNewBrowser(BrowserType.InternetExplorer);
var b = m.ActiveBrowser;
b.NavigateTo(
"http://www.invescopowershares.com/products/holdings.aspx?ticker=PQZ"
);
var h =
new
DownloadDialogsHandler(b, DialogButton.SAVE,
"C:\\PQZHoldings.csv"
, m.Desktop);
HtmlAnchor a = b.Find.ByExpression<HtmlAnchor>(
"id=ctl00_MainPageLeft_MainPageContent_ExportHoldings1_LinkButton1"
,
"tagname=a"
);
a.Click(
false
);
h.WaitUntilHandled(10000);
}
}
File download prompt appears and then closes. In 10 seconds I get a timeout error.
I still have to use the old ArtOfTest 2.0 release...
7 Answers, 1 is accepted
0
Alexey Ivanov
Top achievements
Rank 1
answered on 10 May 2011, 05:32 PM
Seems that it is in some relation with Settings.UnexpectedDialogAction.
But I'm not completely sure.
But I'm not completely sure.
0
Hello Alexey,
I wasn't able to confirm this. I made small adjustments to get it to work in my environment but it's the same code:
I used 1502. First I ran the test against IE9. It passed successfully. The only problem I saw was that the handler ignores the path parameter and uses IE9's default download folder instead. This is already logged and will be fixed in the near future.
Next I downgraded the machine to IE8 and ran the test again. Initially the test failed due to my security settings. In order go get it to work I had to add the page to "Trusted Sites" (see screenshot). I also made sure all possible security settings (pop up blocker etc) were set to allow downloads. Once I did that I was able to successfully handle the Dialog.
I believe that your problem with IE8 is probably related to security settings. Please recheck this.
All the best,
Stoich
the Telerik team
I wasn't able to confirm this. I made small adjustments to get it to work in my environment but it's the same code:
ActiveBrowser.NavigateTo(
"http://www.invescopowershares.com/products/holdings.aspx?ticker=PQZ"
);
var h =
new
DownloadDialogsHandler(ActiveBrowser, DialogButton.SAVE,
"C:\\PQZHoldingsxxxxxxxxxxxxx.csv"
, Manager.Desktop);
HtmlAnchor a = Find.ByExpression<HtmlAnchor>(
"id=ctl00_MainPageLeft_MainPageContent_ExportHoldings1_LinkButton1"
,
"tagname=a"
);
a.Click(
false
);
h.WaitUntilHandled(10000);
I used 1502. First I ran the test against IE9. It passed successfully. The only problem I saw was that the handler ignores the path parameter and uses IE9's default download folder instead. This is already logged and will be fixed in the near future.
Next I downgraded the machine to IE8 and ran the test again. Initially the test failed due to my security settings. In order go get it to work I had to add the page to "Trusted Sites" (see screenshot). I also made sure all possible security settings (pop up blocker etc) were set to allow downloads. Once I did that I was able to successfully handle the Dialog.
I believe that your problem with IE8 is probably related to security settings. Please recheck this.
All the best,
Stoich
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
Alexey Ivanov
Top achievements
Rank 1
answered on 11 May 2011, 12:29 PM
Stoich, which value of the UnexpectedDialogAction option do you use?
If I set it to NotHandle then dialog works, but with the default value they don't.
Is it expected behavior?
If I set it to NotHandle then dialog works, but with the default value they don't.
Is it expected behavior?
0
Hello Alexey,
I'm glad you mentioned this. Yes, this is in fact expected behavior. UnexpectedDialogAction will immediately handle any dialogs that appear in the page before the actual Dialog which you've set up can handle them. This will then cause your Dialog handler to fail because it can't find a Dialog to handle anymore. So just keep it to NotHandle.
Greetings,
Stoich
the Telerik team
I'm glad you mentioned this. Yes, this is in fact expected behavior. UnexpectedDialogAction will immediately handle any dialogs that appear in the page before the actual Dialog which you've set up can handle them. This will then cause your Dialog handler to fail because it can't find a Dialog to handle anymore. So just keep it to NotHandle.
Greetings,
Stoich
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
Alexey Ivanov
Top achievements
Rank 1
answered on 17 May 2011, 09:40 AM
I think that UnexpectedDialogAction is a useful feature to close occasional browser windows.
But, why DownloadDialogHanlder does not disable it temporary? This "expected behavior" is not very intuitive.
But, why DownloadDialogHanlder does not disable it temporary? This "expected behavior" is not very intuitive.
0
Hi Alexey,
I agree with you. It's actually logged as a bug and you can expect positive changes in that regard in the near future.
Best wishes,
Stoich
the Telerik team
I agree with you. It's actually logged as a bug and you can expect positive changes in that regard in the near future.
Best wishes,
Stoich
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
Alexey Ivanov
Top achievements
Rank 1
answered on 20 May 2011, 02:21 PM
Glad to hear this!