Right Click: cannot bring the target application in foreground because the windows session is locked


Unattenden modda çalışan bir süreç geliştiriyorum. Süreci geliştirme yaptığım sunucuda test ettiğimde, yani robotu çalışırken izlediğimde herhangi bir problem olmadan çalışıyor.

Ancak, orchestrator üzerinden zaman ayarı yaparak robotun kurulu olduğu sunucuda çalışmasını istediğimde bir yere kadar geliyor ve sonra hata verip çalışmasını durduruyor.

Hata alınan aktivite sağ click aktivitesi, sebebi ne olabilir ve bu hatanın önüne nasıl geçebilirim?

Hi @Ramazan,

Welcome to the Community!

Even though the windows session is locked, can you try using show window or activate window, or focus activity to bring the screen on foreground?

Hi @adiijaiin

Not working,

It seems like you are developing an unattended process that works fine when tested on the server where the robot is installed while you are monitoring it. However, when you schedule the robot to run on the server via Orchestrator, it encounters an error and stops at a certain point.

If you are receiving an error specifically on the “Click” activity, it could be due to the following reasons:

  1. UI Element not found: The “Click” activity may not be able to find the UI element it is supposed to interact with. This can happen if there are changes in the application’s user interface or if the selector used in the activity is not reliable. Check the selector used in the activity and ensure it accurately identifies the target UI element.

  2. Timing issues: The timing of the “Click” activity might be sensitive to the execution speed of the application or the server. When you monitor the robot’s execution manually, you may introduce slight delays or interact with the application in a way that compensates for timing issues. However, when running unattended through Orchestrator, the timing may differ, leading to errors. Consider adding appropriate delays or using activities like “Wait for Element” to ensure the UI element is ready before performing the click action.

To overcome these issues and prevent the error on the “Click” activity, you can try the following steps:

  1. Verify the selector: Ensure that the selector used in the “Click” activity accurately identifies the target UI element. You can use UiExplorer or the Selector Editor in UiPath Studio to validate and fine-tune the selector to make it more robust.

  2. Use reliable selectors: Instead of relying solely on dynamic attributes, try using more stable attributes in the selector that are less likely to change between different runs or sessions.

  3. Implement retries and error handling: If the “Click” activity fails due to intermittent issues, you can use error handling techniques such as the “Retry Scope” or “Try-Catch” to retry the action a few times before considering it a failure. This can help mitigate transient issues that may occur during execution.

  4. Add appropriate delays: Introduce suitable delays before the “Click” activity to allow the application or UI element to load properly. You can use activities like “Delay” or “Wait for Element” to ensure the element is ready for interaction.

  5. Check application compatibility: Ensure that the application being automated is compatible with unattended automation. Some applications may have restrictions or limitations when it comes to running in an unattended mode or headless environment. Consult the application documentation or reach out to the application provider for any specific guidelines or recommendations.

By validating and adjusting selectors, incorporating retries and error handling, adding appropriate delays, and ensuring application compatibility, you can increase the reliability of your unattended process and address the error encountered during the “Click” activity.