Page 1 of 1

Does Ranorex need a Windows session to run?

Posted: Thu Mar 30, 2017 6:56 pm
by RanoTester
My assumption is that Ranorex playback is only supported on machines that are actually logged into Windows. Is this correct?

Scenario: Ranorex is installed on a Windows 7 machine and runs wonderfully when logged into windows. Ranorex can run successfully on this machine when kicked off via Ranorex Studio or via Scheduled Task. The user logs off this machine or locks the machine. The Ranorex scheduled task does not kick off when the machine is logged off of Windows. When locked, the result is usually a black screen.

Workaround: If for some reason the playback machine is not logged into Windows or is Locked, we ensure is unlocked / logged into windows before playback is to begin. The automation will then run regardless of whether we unplug the monitor and mouse / keyboard.

Note: We are using Ranorex 6.1.1 for our Windows 7 machines. For Windows 10, we are using Ranorex 6.2.1. We get this behavior in Windows 7; I presume it is the same Windows 10 - That we need to be logged into Windows in order to run Ranorex scripts.

Re: Does Ranorex need a Windows session to run?

Posted: Thu Mar 30, 2017 7:17 pm
by krstcs
Yes. Ranorex (and any other functional UI automation tool for Windows) requires a fully realized and unlocked desktop in order to operate and identify UI elements.

Windows does not actually allow any interaction with the desktop on a locked system, by security design.

In your situation, I would suggest either keeping the system logged on and unlocked at all times (if allowed) or using a third-party tool that will unlock the system for you when the tests start.

I use the second option, along with Jenkins CI, and it works well, since we have a domain requirement for locking systems after inactivity. The tool I use is called Autologon (you can search for it, I'm not going to link it here because it's a commercial tool (it is pretty affordable though). It allows you to have the system automatically log on as a specific user as well as lock and unlock the system from the command line (such as from Jenkins). I have it unlock the system right before my test runs, then lock it back after the test is done.

Re: Does Ranorex need a Windows session to run?

Posted: Thu Mar 30, 2017 8:17 pm
by RanoTester
Excellent feedback, thanks. That's why I elect to work from the office . . . so I can prep the automation machines before leaving for the day. Our Ranorex automation is running on physical PC's. The only times we run into this 'not logged into Windows' scenario are the infrequent times I need to work remotely. For now, we'll continue with the process of having someone physically log back into Windows (on the playback machines) in such cases. :)