I am using VBA to automate some operations on the website. Moreover my browser is IE11.
I know that if I want to click "Save" option on the Frame Notification Bar I can use the following chunk of code:
Dim o as IUIAutomation
Set o = New CUIAutomation
Dim h as Long
h = ie.hwnd
Dim ie as InternetExplorer
ie = CreateObject("InternetExplorer.Application")
h = FindWindowEx(h, 0, "Frame Notification Bar", vbNullString)
Dim e as IUIAutomationElement
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
Similarly if I want to click "Open" option I can replace the word "Save" on the code above with the word "Open".
M problem is that after clicking "Save" option, I have 3 another options to click: "Open", "Open folder", "View downloads". I can also close the Frame Notification Bar by clicking the button in the right corner of the Frame Notification Bar. It is visible below:
My question is: How can I click this button using VBA?