2011.1.502 DownloadDialogsHandler broken in IE8

8 posts, 0 answers
  1. Alexey Ivanov
    Alexey Ivanov avatar
    45 posts
    Member since:
    Sep 2009

    Posted 10 May 2011 Link to this post

    In the latest version download dialog processing seems to be broken even in older browsers :(

    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;
     
            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...



  2. Alexey Ivanov
    Alexey Ivanov avatar
    45 posts
    Member since:
    Sep 2009

    Posted 10 May 2011 Link to this post

    Seems that it is in some relation with Settings.UnexpectedDialogAction.
    But I'm not completely sure.
  3. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 11 May 2011 Link to this post

    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:
     
               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
  4. Alexey Ivanov
    Alexey Ivanov avatar
    45 posts
    Member since:
    Sep 2009

    Posted 11 May 2011 Link to this post

    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?
  5. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 16 May 2011 Link to this post

    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
    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
  6. Alexey Ivanov
    Alexey Ivanov avatar
    45 posts
    Member since:
    Sep 2009

    Posted 17 May 2011 Link to this post

    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.
  7. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 20 May 2011 Link to this post

    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
    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
  8. Alexey Ivanov
    Alexey Ivanov avatar
    45 posts
    Member since:
    Sep 2009

    Posted 20 May 2011 Link to this post

    Glad to hear this!
Back to Top