IE11 Frame Notification Bar Save button

后端 未结 2 953
花落未央
花落未央 2020-12-02 01:17

On a 64-bit system with MS Excel 2010 and IE11 I\'m using this code to automate download process from a website:

hWnd = FindWindowEx(IE.hWnd, 0, \"Frame No         


        
2条回答
  •  我在风中等你
    2020-12-02 01:21

    If somebody is still trying to find the solution, for IE11 it's here.

    On the very first line of the code of Vahagn Sargsyan above, instead of "Frame Notification Bar" get the exact title of the dialog box, which might be in English "View Downloads - Internet Explorer". This allows you to grab the right hWnd.

    Because in IE11 there no more button accelerator to Save files, follow the solution posted here by pmr.

    From pmr code, just get the following lines:

    Set e = o.ElementFromHandle(ByVal h)
    Dim iCnd As IUIAutomationCondition
    Set iCnd = o.CreatePropertyCondition(UIA_NamePropertyId, "Save")
    
    Dim Button As IUIAutomationElement
    Set Button = e.FindFirst(TreeScope_Subtree, iCnd)
    Dim InvokePattern As IUIAutomationInvokePattern
    Set InvokePattern = Button.GetCurrentPattern(UIA_InvokePatternId)
    InvokePattern.Invoke
    

    This should solve your issue. This unlocked the situation for me with French localisation.

提交回复
热议问题