Handling Unexpected Popup Windows

Hi,

I am having an issue with handling a pop-up window message from the system I am currently using. The scenario is that after logging into the system and working for some time, an unexpected countdown window appears. This window requires me to choose between two buttons: “Continue” or “End” the session. Clicking “Continue” will allow the session to continue, while clicking “End” will terminate the session, requiring a new login. I have attached an image of the countdown window for reference. I would like to know how to handle this situation effectively, specifically pressing the “Continue” button to keep the session active. Could someone please advise if using the Try Catch activity is suitable for this scenario? or is there any other way that this issue can be handled?

Countdown Window

Your assistance would be greatly appreciated.
Thank you.

@shehani.perera,

I would suggest to use Check app state to check if this popup is there or not. If appear, Add Click activity to click continue.

Thanks,
Ashok :slight_smile:

Thank you for your response. Since this pop-up window appears unexpectedly, I find that using the check app state activity wouldn’t be effective. If I use the check app state activity at the beginning of the process, I wouldn’t be able to continue the session if the pop-up appears after it has been checked or during other processes. Additionally, since this pop-up appears unexpectedly, what method would you suggest using instead?

@shehani.perera,

You can put this check app state logic in a separate workflow and your other remaining logic in another.

Invoke both workflow from Parallel activity and check mark the Isolated property of both.

You can increase the wait time of Check App state to approx. time your code requires to run.

With this approach your both workflows will work simultaneously. Check app state will keep looking for the popup and as soon as it finds, will click on Continue. Also your main business logic will not be interrupted by it.

Thanks,
Ashok :slight_smile:

Hi,

Thank you for your response and for the suggestion. As a beginner in UiPath, I develop processes by learning myself. The Parallel activity was new to me, so I tried an example to better understand it. What I noticed is that even though it’s called “Parallel,” it doesn’t exactly run tasks at the same time. If one process starts, the next one waits until the first finishes. If there’s a delay in the first process, UiPath might switch to the second process and then come back. So, even though it’s named “parallel,” it’s more like doing tasks one after another with the ability to switch between them quickly. Am I correct?

Also, can I know where I can find the Isolated property?
Thank you.

I would suggest using a try catch. If this pop appears in some part, then I expect that the workflow is likely to run into an exception (i.e not finding selectors because of the pop up). Then on the catch part, add an element exists activity to check if the pop up is active. If it is active then add an activity to click “Continue”, if not add a rethrow activity to get the actual cause of error.

2 Likes

@shehani.perera,

May be it’s due to not checked Isolated property.

Thanks,
Ashok :slight_smile:

2 Likes

Hi,

I tried your method and it seems to be working fine for now. Thank you very much for your support.

Best Regards,
Shehani

@shehani.perera,

That’s great! Kindly close the thread by marking my answer as solution.

Thanks,
Ashok :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.