Running Attended robot with UI Automation in the StudioX on the server

Hello, I am running web scraping script (attended robot) on the company server. We have community version. This script takes hours to be completed and it works fine while my remote desktop is open but when I close remote desktop connection I get error “cannot bring the target application in foreground because the windows session is locked”.

I thought if the server is running 24/7 it has to work regardless remote desktop is open or not. Have you faced such problem? Is it possible to run the script on the server and close the remote desktop? What are the possible solutions?

Thank you!

Its an attended automaton, if you want to leave it to work probably better using unattended

Thank you for the answer, I would be happy to use unattended robot however my company has only community version for now. Community version does not include unattended robots.
I thought that if I run attended robot on the server then attended robot will be also working. But when I close my remote desktop connection to the server, script cannot interact with the environment

Community does have 1 Unattended robot license. Perhaps there is a mix-up between Community and Free plan? Check here for the differences:
Automation Cloud - About licensing -
Can you confirm which plan you are using?

Hi @nika

You might be having the UI automatic in which the bot need to interact with the application for typeinto or click or some other process so please look into it. If there is an UI Automation then definitely you need to enter the remote desktop to run the bot successful.


Thank you for your answer and information about licences. I didn’t know the difference between Free and Community plans. I checked and turns out that I have Free plan. If I have no other solutions than switching from free to community version in case to run the script without remote desktop on, what guide should I follow? I found this information, do you know if I still can follow this guide?

Thank you for your answer, yes, I have UI automation and error occurs on the typeinto activity. Then I think the only solution for me is switching from Free to Community version and run unattended robot

Hi @nika

You can’t make it the unattended bot when the UI is mandatory over there. If you are using any desktop applications the UI might be like hardware events type so in such cases the unattended bots won’t work so please check that.


Somebody else might have a better say in how it’s possible to switch, but at least one option is to just create a new organisation. You will need to verify if you comply with the Community terms, though.

From the same page I linked:

A free plan that gives you instant access to elementary automation capabilities through licenses for users and UiPath services.

It is aimed at non-commercial use only. For commercial purposes, the Free plan is available.

So if you are using it for commercial purposes, it’s not possible to use Community.

So even with unattended robot running on the server (server is obviously running 24/7) it is impossible to run scripts that use UI automation? Like web scraping from the website

Thank you for your answers, got it :slight_smile:

I have scrolled forum for some information regarding unattended robots and UI automation and find this article: Click 'LABEL': Cannot bring the target application in foreground because the Windows session is locked - #5 by marian.platonov

From this answer it seems that it is possible to run UI Automations in the unattended robot

1 Like

Hi @nika

Please see that it also said like it will run in background but it shouldn’t interact with UI. Please check that it showed in the screenshot only.


Ah, thank you, I am blind :smiley: Thank you for all your answers, now I understand that it is impossible to run UI Automations in the Unattended Robot

1 Like

I think we may have a confusion about how an Unattended robot works. You are supposed to start the Unattended robot from Orchestrator, which makes Orchestrator create an RDP session on the robot machine and the process is run on the server without anybody having to intervene (eg. creating the RDP session manually).

UI interactions are not a problem for the Unattended robot.

The screenshot about Starting in background, is mostly relevant to Attended processes. You can read about Background jobs from the docs, but in a nutshell, they allow a user to run multiple Attended jobs at a time, with the limitation that UI interactions can’t be done while the job is in the background.

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