mouseMove fails with nRuntimeError: Failed sending fake pointer move

198 Views Asked by At

I'm running squish (Qt and Windows) on a Windows VM. I use Remote Desktop (RDP) to access the VM. I'm trying to run a suite of tests from the command line (No Squish IDE). Everything works fine if i keep the RDP session open. If i close the RDP session, then mouseMove fails (and probably any mouse function also). Reason I would like to close the RDP session is so i can run the test suite overnight, hence close my local computer down, (the VM machine will still be running overnight of course)

Is there a workaround for this ? I noticed there are sendEvent functions. Could these work instead of using the mouse functions. I know the Qt events, but not sure which events to use for Windows.

1

There are 1 best solutions below

0
A_Wdgnm On

Squish doesn't run on a headless windows system. https://kb.froglogic.com/squish/howto/using-squish-headless-systems/

A workaround might be a display dummy connected to the VM. In this case you need to close the RDP connection by using

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

so that the screen will be unlocked locally.