web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Outlook / Failed to ge...
Power Automate
Unanswered

Outlook / Failed to get UI element / every second opening of new calendar event window

(0) ShareShare
ReportReport
Posted on by 11

Hi,

I have built in PAD flow to rewrite calendar schedule from excel file to shared calendar.

Every second opening of new event windows PAD throws "Click failed (failed to get UI element)" 😥

No change in window name, have not found any explanation of this problem.

Have tried to substitute one step with image recognition but it seems that every time second event windows is opened PAD is not able to use UI element actions...

Any idea what might be the cause?

 

ERROR

Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Click failed (failed to get UI element) ---> Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Exceptions.ElementNotFoundException: Exception of type 'Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Exceptions.ElementNotFoundException' was thrown.
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.AutomationRuntimes.UIAutomationRuntimeBase.RetractElement(IntPtr windowHandle, String selector)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.AutomationRuntimes.UIAutomationRuntimeBase.ClickElementInWindow(IntPtr windowHandle, String selector, MouseClickTypeEnum clickType, RectangleEdgePointEnum elementRectangleEdgePoint, Int32 offsetX, Int32 offsetY)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Proxy.LocalAutomationRuntime.ClickElementInWindow(String windowSelector, String controlSelector, Int32 offsetX, Int32 offsetY, Int32 clickType, Int32 elementRectangleSubsector, Int32 automationImpl)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.ClickElementInWindow.<>c__DisplayClass21_0.<Execute>b__0(IAutomationRuntime r)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.UIAutomationActionBase.PerformAutomation(Action`1 action, UIControl control)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.ClickElementInWindow.Execute(ActionContext context)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.ClickElementInWindow.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)


OUTLOOK VERSION: Microsoft® Outlook® for Microsoft 365 MSO (Version 2210 Build 16.0.15726.20000) 64-bit

PAD VERSION: 2.23.114.22217

  • VJR Profile Picture
    7,635 on at

    Hi @DominikKocieck 

     

    Sorry that I couldn't help much with the UI elements of Outlook because interacting with UI elements should be the absolute last option when there is nothing else to do.

     

    Hope you get help from the forum on this error. If not, I would recommend writing something like a VBA or a vbscript if you are looking to import an excel as a Calendar schedule.

    Not sure if this serves your requirement but take a look.

     

    https://www.slipstick.com/developer/create-appointments-spreadsheet-data/

    https://forums.slipstick.com/threads/97485-excel-vba-and-shared-calendar-issue/

     

     

  • DominikKocieck Profile Picture
    11 on at

    @VJR 
    Thx for links 👍

  • DominikKocieck Profile Picture
    11 on at

    I have switched to Outlook Web Access through office.com and here my Powe Automate Desktop flow works well.
    I had to use in few places key press like TAB or arrow keys because PAD had problems with location on fields in second iteration even on OWA,
    BUT IT FINALLY WORKS 😁

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard