Running code in Virtual Machine

Hey!

So I’m running a project from a virtual machine. When I run it and leave the VM window open, it runs perfectly, but once I minimize the VM window, I get selector errors. It’s like once I minimize the VM I can’t use activities that use UI.

I never had this problem before, anyone can help?

Thanks

if you need this to work, you need to use all activities that can run in the background or it will error out…

I just found the solution to the problem. Executing Tasks in a Minimized RDP Window

Thanks!

1 Like

nice, but keep in mind that only background activities will work…

I’ve got kind of an irregular solution to this same issue.

Enter the following code in a text file and change the extension to .bat

for /f “skip=1 tokens=3” %%s in (‘query user %USERNAME%’) do (
%windir%\System32\tscon.exe %%s /dest:console
)

Source: Disconnecting From Remote Desktop While Running Automated Tests | TestComplete Documentation

This will keep the RDP session alive (although you’ll be booted out) and processes will be able to run in the VM using both background and foreground activities.