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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / If window contains not...
Power Automate
Unanswered

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
    15,402 Super User 2025 Season 2 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
    15,402 Super User 2025 Season 2 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
    3,844 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard