Input to Browser fails when remote desktop is not connected

browser
uiautomation

#1

Input to Browser fails when remote desktop is not connected.

I have a process that works if i have remote desktop open and looks at uipath work. But if i disconnect it fails shortly after, because uipath say it cannot find the element that it wants.

its on a wm ware system ?

Does anybody has that problem ?


Execution in background (type / click)
Robot stop when changing from virtual machine - to local
#2

Hi,

Which version and browser you’re using?
I was having similar issues with Chrome and some of 2016.1 and v8 versions during some processes, also on a vm. Workflow would sometimes fail in unattended runs, worked flawlessly otherwise.
Usual cause was it was trying to access elements before the plugin was activated (when opening new window). Adding a refresh of the page before accessing elements helped as far as I remember.


#3

Thanks . I will try that (I use Explorer)

But i also found out that everything that touches ui, must be placed outside main.

And the you will have to use Launch Windows Interactive activity, instead of Invoke Activity.

The the machine makes sure that its not session 0 in windows that runs the code ( because session 0 dosent have any ui)


How can the robot work when remote session is disconnected
#4

Yes, that’s true - all UI interacting activities need to be under LaunchWorkflowInteractive, preferably with KeepSessionConnected = True. The Main is started as non-interactive (background).

As far as I’m aware the interactivity does not cascade, meaning that if you have Main -> LaunchInteractive -> InvokeWorkflow, you’re back to non-interactive part and it might fail. At least that was my experience last time I checked it.


#5

It is a known issue. The UI session is destroyed when you minimize or close the RDP session and only background automation - Simulate Type, Window Messages - will still work.

To avoid this you can:

  • start the workflow from Orchestrator (not possible with CE)
  • run it from the tray after setting login credentials

UI Path scripts are failing when RDP is disconnected
Disconnecting Remote Desktop
#6

Is it possible to have the process running without the Orchestrator? I have only Studio in my desktop and a Robot in the remote desktop.

Is it possible with this configuration to have the process work when the remote desktop session is not open?


#7

Hi. I know how to solve this. Te reason this goes wrong is that the proccess always start in windows like systems does, that means no ui. And that why i crashes.

When you make a process the only thing you have in main.xaml is an activity - Launch Workflow Interactive, and that point to another xaml file where all the code is in. This activity ensures that the code always runs in the windows mode that have ui. and then it works.

And you can do this without an orchestra


#8

How do you Launch Workflow interactive?


#9

Hey @selrac

It is an activity in activity bar. you can check there.

For your reference:
https://www.uipath.com/activities-guide/launch-workflow-interactive

Regards…!!
Aksh


#10

perfect, thanks. I’ll give it a try


#11

I tried it but I seem to be getting an error:

To initiate the robot I use the dos command. Then I close the virtual machine session. The process checks a folder and when a file is received it should ‘launch the workflow interactive’ activity. Are there additional settings to set up?

Thanks


"Desktop has been disconnected while performing UI action" error while running Lesson 2 Practice 1
#12

Hi.
The main.xmla must only have the launch activity inside it. And all sub sequenses should be called with the launch activity.
The one you attached wont work


#13

I tried as you suggested thomasteske, but it doesn’t seem to work. It gets stuck in the browser action. There is an error message also in the browser saying that there in so current session.


#14

Have you tried this?


#15

I don’t seem to find the registry key you mention:

I managed to make the process work by enabling loginToConsole in an invoke process in the middle of the workflow. Well, I’m not sure if it works fully as the process is getting stuck somewhere else, so I’m not sure what will happen when the invoked workflow is completed and in has to continue with the next steps.


#16

You’ll need to create it.


#17

Sorry, I understand.

Just tried and seems to be working. Thanks Mihai!!!


#18

Were you using RDP?


#19

Yes, it is a virtual machine


#20

Execution still fails when minimizing the virtual machine.

I asked the admin to change the VPNed system to add to registry.Changed my script to invoke workflow interactive.

But still execution fails.

Please help on this !