Catch ERP Pop Up Window

While building a bot, I encountered the following problem:

Thousands of delivery note transactions are sorted from the ERP system. Two pop-up windows can appear for a transaction. The first appears when a transaction is opened and is an information window. The second appears after closing a transaction and is a warning window. Not every operation has an information and/or a warning window.
An attempt has been made to intercept the windows with a Check App State. The windows should be clicked away when they appear. If no window appears, nothing should happen, i.e. the process should continue.
Now to the problem: For both cases a solution with Check App State was tried. The warning window is handled correctly. If the window appears, it is clicked away. If the window does not appear, the process is continued.
The information window does not work. If the window appears, it is clicked away. But if no window appears, it takes about 60 seconds for UiPath to throw the following error: UiPath.UIAutomationNext.Exceptions.NodeNotFoundException.

Of course, UiPath does not find the information window, as it does not appear, so it should continue with the process. I am very surprised that there are no problems with the warning window, but with the information window, although both windows have the same structure.

I have already tried to solve the problem using classic functions such as Element Exists and Element Appears, but here too the same error as with Check App State.

Any ideas how to solve this?

@burg-services

There are a few ways to solve this problem. One way is to use the ElementExists activity instead of the Check App State activity. The ElementExists activity will only throw an exception if the element is not visible, so it will not cause the bot to wait if the information window is not present.

Another way to solve this problem is to use the Element Appears activity. The Element Appears activity will wait until the element is visible before continuing, so it will not cause the bot to wait if the information window is not present.

Increase the delay in the property panel

or Use retry scope

Or use try catch activity

Hi @burg-services

  1. Open the Check App State activity for the information window.
  2. In the Properties pane, locate the TimeoutMS property.
  3. Set a reasonable timeout value in milliseconds (e.g., 5000 for 5 seconds).
  4. Save and run your workflow.

By adding a timeout, UiPath will wait for the specified duration for the information window to appear. If the window doesn’t appear within that time, it will not throw the “NodeNotFoundException” error and will continue with the process.

Hi @burg-services

Welcome to Community!!

  1. Check App State Timeout: In the Check App State activity for the information window, make sure to set a shorter timeout value. By default, the timeout might be set to a high value, resulting in a significant delay before the activity fails when the information window is not found. Set the timeout to a reasonable duration, such as a few seconds, based on the expected time it takes for the information window to appear.
  2. Use Try-Catch: Wrap the Check App State activity with a Try-Catch block. This way, if the NodeNotFoundException occurs, you can handle it gracefully without the workflow stopping abruptly.
  3. Retry Mechanism: Implement a retry mechanism to attempt finding the information window multiple times before throwing an exception. You can use a While loop with a counter and a delay to retry the Check App State activity a few times.
  4. Element Exists: In addition to the Check App State activity, consider using the Element Exists activity to check for the information window. The Element Exists activity is less strict than Check App State and will return a boolean value (True or False) based on the existence of the element. You can use this activity to check for the information window and proceed accordingly.
  5. Adjust Selector: Ensure that the selector used in the Check App State activity is robust and capable of locating the information window accurately. You can fine-tune the selector or use other attributes if the default selector is not reliable.