Skip to main content

Notifications

Community site session details

Community site session details

Session Id : QlBz7CKvkEanI7R0OEUe3R
Power Automate - Power Automate Desktop
Suggested answer

PAD: Handle Unknown Popup Message

Like (1) ShareShare
ReportReport
Posted on 14 Mar 2025 20:04:19 by 635
Hi,
Is there a way to handle unknown pop-ups message in a legacy desktop app running in a VM with an unattended desktop flow?
  • Suggested answer
    eetuRobo Profile Picture
    3,032 Super User 2025 Season 1 on 15 Mar 2025 at 07:10:10
    PAD: Handle Unknown Popup Message
    Hi @w.p,

    Since I don’t have access to the application I can’t really give detailed instructions on how to handle exceptions in those scenarios. I can give some pointers and if I can see examples of the popup UI elements then I can maybe help a bit more. Also share a screenshot of the sales report generation window so I can give better suggestions. Also show what you already have built in your flow and where you have issues with.

    Give detailed explanation of the process with pictures. When you create a sales report in the system does your flow get the information form some external file like pdf or excel or does it all come from the application?


    Can you share examples of couple of different popup message UI elements.
    So recreate couple of situations that give different popup message and capture the UI element with Add UI element.


    Then open the elements in edit to see how they look


    Then show picture of the UI element like this. So maybe the Class attribute will always say "Warning" or something else which we can determine it to be an unexpected pop up.



    How I would approach it would be to recreate the scenarios which give those popups and build logic for them. So if certain window or element pops up with certain text then have if condition that deals with that.

    So for example:


    The second action checks if Purchase Date is empty and if it is then it populates it with todays date. 
    If at the end when flow presses "Generate Report" it gives something else than "Sales Report Generated Successfully" then the flow takes screenshot and sends that to you.

    Or you could have "Wait for window content" -action instead of the If window contains. And if the "Sales Report Generated" -UI element never comes up after pressing Generate Report then the action has On error that starts subflow that does the exception handling.


    On error on the "Wait for window content" -action would look something like this:


    And the subflow you would have the exception handling so at least the screenshot and send email.


    Hope this helps :)
  • w.p Profile Picture
    635 on 14 Mar 2025 at 22:06:22
    PAD: Handle Unknown Popup Message

    Could you please share in detail on how to create the exception, for example about generating a sales report with fields like Customer Name, Purchase Date, Purchase Amount, and Email? Some records may have missing fields, like the Purchase Date.
    If the Purchase Date is missing, we can use today's date, and if the Customer Name is missing, we can click Yes to generate the report without it.
    For any unknown popup messages, send an email notification to the user with an error screenshot.

    Thank you for taking the time to answer my question. I really appreciate your help!

  • Suggested answer
    eetuRobo Profile Picture
    3,032 Super User 2025 Season 1 on 14 Mar 2025 at 21:20:21
    PAD: Handle Unknown Popup Message
    I think it depends on the application. Some apps have clear attributes in UI elements to indicate they are pop-up messages and so you can build a logic to handle those (maybe by send key press enter or close the popup from close button).

    To handle all unknown popup messages blindly might be a bit risky. The popup message could ask something very critical. You don't want your flow to just proceed by closing it or pressing ok if you don't know what that does. What if the popup message asks "Do you want to delete this record" or do something else that can't be undone?

    I think it's better to try to recreate the exceptions that cause those pop-up messages so that you can build a logic for all those possible exceptions and handle them accordingly.

     

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,436 Most Valuable Professional

Leaderboard
Loading started