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 / If window contains not...
Power Automate
Suggested Answer

If window contains not refreshing through flow

(2) ShareShare
ReportReport
Posted on by 15

I'm using 'If window contains' logic in several places, and what I've observed is that it doesn't seem to refresh the state at different points in the flow. If, at any point, a certain popup existed (even if the bot then closed it), at a later point it will register 'if window contains' as true for checking if that popup exists.

 

Is this a known bug in behaviour? Is there a known workaround?

 

beckymc_0-1693269796218.pngbeckymc_1-1693269817719.png

 

I have the same question (0)
  • trice602 Profile Picture
    16,305 Super User 2026 Season 1 on at

    Hi @beckymc ,

     

    You are not alone; I also have the same issues and haven't found a viable solution to work around this either.

     

     

  • beckymc Profile Picture
    15 on at

    After contacting Microsoft directly on this [quote TrackingID#2308290030000580 if you're contacting them for a similar problem], the advice was:

    Whether using the 'if window' or 'if window contains' action, to get this functionality to reliably work you need to provide a UI element within a window, rather than the window itself. They confirmed that the window state is cached, whereas the UI elements are checked each time.

     

    So for example, rather than checking that my 'info popup' window exists, I check whether the 'cancel' button on my 'info popup' window exists.

     

    It doesn't seem to matter whether you use 'if window' or 'if window contains', there are some slightly different options on each that can be used (e.g. check element state, check window state).

     

    Hopefully this helps future users and yourself @trice602 , however I'm no longer actively working on testing this functionality so while I can confirm this worked in an isolated test, I haven't been robustly using this solution in production level code.

  • trice602 Profile Picture
    16,305 Super User 2026 Season 1 on at

    Thanks for sharing 😊

     

     

  • Suggested answer
    CU16080343-1 Profile Picture
    2 on at
    I have the same problem, I try function Repair UI element to recapture specific UI and problem solved.
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 1 on at
    Hi,
     
    In Some cases parent selector will change, according to find the parent selector and child selector you can edit by using id, ordinal, class and name. 
     
     
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
     
    Regards,
    Riyaz

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 245

#2
David_MA Profile Picture

David_MA 216 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 212

Last 30 days Overall leaderboard