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 / Desktop Power Automate...
Power Automate
Answered

Desktop Power Automate - failed to get window

(1) ShareShare
ReportReport
Posted on by 10

Hi all,

 

I've been using PA to make (mostly excel) flows just fine. Today while editing a flow, I started getting an error. Restarted, worked one more time, and now errors every time. All UI manipulation fails. I've tried reinstall with no success.

 

Failed to press button (failed to get window)

Failed to press button (failed to get window): Robin.Core.ActionException: Failed to press button (failed to get window) ---> Robin.Shared.Runtime.ActionException: Failed to press button (failed to get window)
at Robin.Modules.UIAutomation.Actions.UIUtils.TryFuncThrowExceptionIfNull[T](Func`1 func, ActionException ae)
--- End of inner exception stack trace ---
at Robin.Modules.UIAutomation.Actions.PressWindowButton.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

  • slappydooda Profile Picture
    10 on at

    Update: I discovered that if I recreate my UI Element references, my flows work again. That means I need to go through and redo all UI steps, though...

    So at some random point yesterday, all my UI element references broke (even in the flows I wasn't currently editing). For context, I use two monitors.

     

    Is there a way to log this bug? It's pretty debilitating to have all of your flows just randomly break and require rework. 

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Contact support 🙂

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @slappydooda ,

     

    Majority of the cases, issue will be the name attribute.

     

    1. Go to the UI elements sections from the right panel.

    2. Double click on the parent UI element

    3. Click on edit selector/or double click on the element again

    4. You should see selector builder

    5. Now compare the selector builder with old Ui element selector

    6. Compare the Ui element

    7. If parent element looks fine and exactly same. Then compare with each child element.

    8. Two things to consider here: 1. Ordinal 2.Name

     

     

    Hope this helps 🙂

     

    sakula1996_1-1616004840277.png

     

    sakula1996_0-1616004768407.png

     

     

  • mitsmith Profile Picture
    8 on at

    Hi, I don't understand how this solution helps.  My flow is completely corrupted.  If I have to rebuild the 45 "Click UI element in window" so be it but how do I ensure that the corruption doesn't occur again?  What is causing this behavior?  Thx!

  • fraenK Profile Picture
    2,125 on at

    There is nothing corrupted, applications change, so does their UI. You just need to make the window selectors as robust as possible e.g. using regex and/or multiple checks on the window title/content.

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/ui-elements

  • mitsmith Profile Picture
    8 on at

    Hi,

    Thanks for the feedback!  I'm new to using Power Automate Desktop and when I started creating my first flow it concerned me about what would happen to the UI elements I grabbed if the desktop application (Crystal Reports Developer) I used changed.  With the current issue I'm facing though nothing has changed.  At this company we have to manually install/update Crystal Reports Developer (developed this flow last week - nothing has been updated).  This leads me to a couple more questions...

     

    1) As I'm new perhaps I'm missing a step.  I first open Crystal Reports.  I then start Power Automate.  The first step in my flow is to click a UI element in Crystal Reports.  Do I have to have a preceding flow step that says "Activate the Crystal Reports" window (I looked for a control like that in the flow editor but didn't see it although I didn't have anything like that in place when doing the initial development of this flow)?

     

    2) I looked at the link you sent.  I did use the Control/Click method to capture UI elements.  And I see the section about "Element Properties" and editing the Selector.   And I see your comment about using regex/multiple checks.  Do you know if there is a page anywhere that gives more info on manually editing selectors (I've been searching but I haven't found anything)?  

     

    Thanks!

  • fraenK Profile Picture
    2,125 on at
  • mitsmith Profile Picture
    8 on at

    Thanks for the info!

  • ProRPA Profile Picture
    2 on at

    HI @fraenK could you please provide a sample using regex, the window class changes the last number here is an example ClaWin073350000H_4  I can not get. to focus window to continue automation

  • fraenK Profile Picture
    2,125 on at

    If only the last number changes, then you can use "starts with" with "ClaWin073350000H_"

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
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard