Java App - Click Activity Ignores Timeout Setting and Produces Generic Error

Using Input mode: Simulate (click), my Click activity correctly clicks a Java popup menu item that opens a modal Java dialog. However, the UiPath workflow stops on this Click activity for 60 seconds and then generates a “Click generic error” before continuing as desired (Even though it executed, there is no trace statement entry for this Click event). I understand this behavior could be related to using Simulate Click (the other click types do not work for this case).

  • How can I prevent (or diagnose) this Generic Error?
  • Is this something that can / should be fixed in a future release?
  • How can I set a shorter timeout for the Click Activity (Modern)?

I tried changing the project and the Click activity timeouts to a short timeout, but these values appear to be ignored by the Click activity.

Additional Info:
Windows 11
UiPath.UIAutomation.Activities: v22.4.4
UiPath.System.Activities: 22.4.1

Hi @grosner
You came across an interesting case. The click opens a modal, and the app itself waits for the modal to close, without providing an “answer” back to the Studio. This can only happen with Simulate, and is handled in our code, but it is not exposed so nicely.
To work around the problem:

  1. Use a FindElement activity and store the object. Let’s call it elem.
  2. Use an assign block, or InvokeCode to set elem.UseNonBlockingInput to True.
  3. Use the click activity (classic) to pass elem as the target for the activity and be sure to check the Simulate flag on that activity.

Let’s check if it works.
Now, for the questions:

  1. The workaround will help you to prevent the problem from happening.
  2. The UX can be improved, but the background solution would be the same.
  3. There is the Timeout property on the activity, but the timeout you are talking about is a communication timeout, which, in ideal conditions, should never be reached. I am not sure it can be changed from the UI.

Your solution works! Thank you @vlad.coteanu.

Perhaps in a future release of UiPath Studio:

  • There can be a Click activity property to set UseNonBlockingInput value.
  • The Click activity can show in the Trace listing (like other Click activities already do)

Again, thank you for your quick and accurate reply!

1 Like

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