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 / Failed to get UI eleme...
Power Automate
Suggested Answer

Failed to get UI element because previous element dosent close (is hidding in the background)

(1) ShareShare
ReportReport
Posted on by 11
Hi, 
 
I am creating a power automate desktop flow for a desktop application. 
In the flow i have encountered a problem where: 
 
1. I press a button
2. A window pops up
3. I fill out some information in the window
4. I Press Next
5. The window seems to be closing
6. A new window with information based on the information i filled into the first window is shown 
7. I extract some information from the new window. 

This process works fine when i run the flow manually to test it. But when i trigger it from my cloud flow, it fails with "Failed to get UI element". I can see that it fails to extract information from the second window, because it cant fint the window. To debug this i inserted a "Take picture" just before it fails, and the picture show the first window (like it has now been closed, even though it has). 

I have tried inserting a "Wait" to fix any delay, but that didnt work. 





 
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at
    If I understood correctly you have a main window where you first press some button to open a secondary (popup)window and after you press next that window closes and  new secondary window opens up. And when you try to extract that information the flow fails.

    Your screenshot shows the first secondary window even though it should have closed that when pressing "Next" and opened the new secondary window. So problem is that the flow never seemed to successfully press the Next button?

    Try adding Wait for window content where you have Fail with timeout error set so it doesn’t wait infinitely:
     



    Then also add On error so that if that action fails then the flow continues to the next action and sets Error variable (ColiNotLoaded) to True
     



    Then have if condition that if the error variable is true hen try pressing the Next again (maybe with Press button in window instead of Click UI element since the element is a button)


     At any point where new elements load you should always have "wait for window content". That way if the machine/application/internet connection is running slow you make sure that flow does not try to continue until it has loaded the UI.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard