Question

8
Replies
442
Views
AnilKumarM Member since 2013 5 posts
TCS
Posted: 2 years ago
Last activity: 2 years 8 months ago
Closed

Disconnecting from VDI while running automation - Loosing clipboard data

Hello team,

Our set up - OS run time is installed in a lot of Virtual Machines (VMs) in both QA & prod environments.

Issue - When testing the automation, as long as we are logged on to the VD machines and "active" the automation is able to read the data from clipboard without any issue. QA Testers log on to the VD, start the automation and then log off because the automation would go on for a couple of hours. What we noticed is that as soon as they disconnect (not logoff), clipboard on the VM becomes empty and all further cases would fail from the point testers disconnect from the VMs (not log off). Our automation uses a small script to read data from clipboard.

Can you help us understand why, upon disconnecting from the Virtual machines, automation is not able to read the clipboard data?

Please note that the testers only disconnecting from the remote session. Not logging off. The automation continues as normal. But since the critical data in clipboard comes back empty, all cases start to fail.

Script to read clipboard data -

Thread staThread = new Thread(

delegate ()

{

try

{

idat = Clipboard.GetText();

}

catch (Exception ex)

{

threadEx = ex;

}

});

staThread.SetApartmentState(ApartmentState.STA);

staThread.Start();

staThread.Join();

Robotic Process Automation
Moderation Team has archived post
Share this page LinkedIn