How to create function for catching any warning alert box?

In my case i use UiPath for working with client software. I found this prompt message that could not reproduce. Please see image at below

so, the situation is when my UiPath is executing the process sometime dialog box is show up like this (i mean you don’t know when it happened because, it can be show up anytime. including you never know how is big of the dialog size or any message in box is so dynamically)

Any suggestion for this case if i want something to catch it and then just Press Enter or CLICK OK then the program is can continues to next process. Thanks

Hi @lovepong66 ,

Please try to use try catch block-Inside try block check any pop up appeared or not if yes then send hotkey enter or close the popup else nothing.
For this we could use element exists or check app state activity.


How to check any pop up? can you explain this.

Hello @lovepong66 , You can detect the pop by using the element Exist Activity, It results value in a Boolean, If the dialogue box appears you can design the flow to click the OK button, Else continue the process as per your requirement.

This kind of thing is very difficult to handle. I assume what happens when the popup appears is that your next activity (ie a click or something) fails. Aside from literally checking for it between every activity, there’s not much you can do. Is this a transactional automation? You could put your code into a Try, and in the exception block (which it jumps to if one of your activities fails) you put a check for this popup and clear it. Looks like it’ll close the app so you’d also have to include steps to reopen the app within the exception block so it’s ready for the next transaction.