Click activity giving error

I’m using the Ui path in server PC, the click activity works well when i keep the workflow running in desktop. But when i run the workflow and minimize the screen, the click activity give me a error as

Source: Click- SHow Result Message: Cannot bring the target application in the foreground. Exception Type: UiPath.Core.ElementOperationException UiPath.Core.ElementOperationException: Cannot bring the target application in the foreground. —> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800402ea at UiPath.UiNodeClass.BringIntoView() at UiPath.Core.UiElement.BringToForeground() — End of inner exception stack trace —

->Make sure that the target application is not minimized or running in the background while the UiPath workflow is executing. The application should be visible on the screen for UiPath to interact with it correctly.

Also in the use browser activity properties pannel you can keep the window size as maximum


Hi @infinitydev

  1. Keep the Window Visible: Instead of minimizing the window, try keeping it visible on the screen while running the workflow. This ensures that the target application is in the foreground and the Click activity can interact with the desired elements.
  2. Simulate Click: Enable the “Simulate Click” option in the Click activity properties. Simulated clicks bypass the need to bring the target application to the foreground, allowing the Click activity to interact with the element even if the window is minimized. However, please note that not all applications or scenarios may be compatible with simulated clicks.


Manage this using “Resize window” property in use application browser

Thanks for the response.

When i upload the package in orchestrator and set a timings, i want the bot to run automatically in the server pc. I dont want to keep it open.

so in such cases how should i develop my click activity.


If you don’t want to keep the browser to be opened then try changing the click activity property Input Mode to simulate so that whether the browser is maximized or minimized the click activity works.