Forum Discussion

hlalumiere's avatar
hlalumiere
Regular Contributor
14 years ago

TC9.1, IE9, and the Download Manager.

I have read multiple threads from this forum while googling, the later ones dating about 6 months back, asking about the same thing. I would like to know if this is being looked into.



When you download something in IE9, the immutable and eternally bad Download Manager pops up a bar at the bottom of the page, using a DirectUIHWND class object. That bar can`t be adressed by TestComplete (it can through MSAA but it only works half the time...). Is the only solution really absolute screen coordinates? So if I want to test a website in 5 different resolutions, I need 5 different sets of coordinates for each control I need to address in there?



Mind you, I understand that this issue is not really TestComplete`s, but rather Microsoft's never-ending joke of a security team. I was just wondering if it was in the plans to eventually support that. If not, is there any way to have the standard popup that asks me what I want to do with a file instead of the download manager? I get that popup only with ZIP files apparently...

5 Replies


  • Hi Hugo,


     


    We have a suggestion to implement special support for IE's download manager in our DB, and your request has increased its rating. However, I cannot give you more precise time estimates regarding the terms of the functionality's implementation. At this moment, testing is possible via MSAA (the fact why it doesn't work for you sometimes should be investigated). As far as I know, disabling the manager is impossible in IE 9. Is there anybody who could overcome this?


     

  • mrpalmtree19's avatar
    mrpalmtree19
    Occasional Contributor
    Here's some code I wrote to interact with that window.  Even though it uses pixel locations to click on the buttons, I've found it to be very stable.  There's only two ways the bar is displayed (excluding when the window is so small that the buttons don't fit), and those two ways can be detected by the object's height.



    Note that this code is part of a larger framework I'm using, so it won't work without some modification.




    //****m* WebInterface/Web_Tab_Obj.prototype.IE_NotificationBar_ClickButton


    // PURPOSE


    //    Clicks a button in the notifcation bar in IE.


    // SOURCE


    Web_Tab_Obj.prototype.IE_NotificationBar_ClickButton = function(button)


    {


        var bar = this.IE_NotificationBar_Get();


        if (bar.Exists && bar.Visible)


        {


            switch (aqString.ToLower(button))


            {


                case "close":


                    bar.Click(bar.width-15, 22);


                    break;


                case "open":


                    if (bar.height > 54)


                        bar.Click(bar.width-200, 55);


                    else


                        bar.Click(bar.width-222, 23);


                    break;


                case "save as":


                    //open save drop down


                    if (bar.height > 54)


                        bar.Click(bar.width-94, 55);


                    else


                        bar.Click(bar.width-115, 23);


                    Delay(999);


                    bar.Keys("a"); //select save as


                    break;


                default:


                    Log.Error("This button hasn't been implemented yet");


            }


        }


        else


            Log.Error("Notification bar did not exist");


    }


    //****

  • mrpalmtree19's avatar
    mrpalmtree19
    Occasional Contributor
    First, because I didn't realize that was an option :)



    Second, because this is in code shared by many projects, and having it rely on specific project settings makes it much harder to work with.  It'd be nice to be able to temporarily turn on the MSAA settings in the script.

  • Hi David,


     


    Thanks for your reply! I've discussed with our developers the possibility of adding the DirectUIHWND class to MSAA by default. They agreed to implement this. At least, this will help other users not to worry about settings that should be changed in order to test this dialog.