Ranorex doesn't find buttons when running without screen

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Intern
Posts: 1
Joined: Thu Oct 25, 2012 12:11 pm

Ranorex doesn't find buttons when running without screen

Post by Intern » Thu Oct 25, 2012 2:02 pm

Hi,

I am trying to create a local application that starts up a virtual machine (through Lab Manager), remotely runs tests on it and retrieves the results.

Right now it works like this:
1. The local Machine starts up the virtual machine (without connecting to it).
2. When the virtual machine starts it logs on and runs, through task scheduler, an interactive process that starts listening for a connection on a socket.
3. The local machine sends a message to the socket to start the tests.
4. The message is received and the tests are started with a .bat-file.
5. Tests are done, the log file is parsed and the virtual machine sends the result to a socket on the local machine.
6. Virtual machine is shut down.

The thing that goes wrong is that all tests fail, because Ranorex does not find any buttons/components. I have tried running the tests through Remote Desktop and then they work just fine, so it has something to do with the lack of screen/connection(?).

Both machines run Windows 7, and the tests are created with Ranorex 3.1.3.15228.

What is the problem here?

Best regards,
Jakob

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex doesn't find buttons when running without screen

Post by Support Team » Fri Oct 26, 2012 12:01 pm

Hi,

Could it be that the window is minimized or locked after the tests are started?
For detailed information about how to remotely work with Ranorex please take a look at the following link: Remotely Working with Ranorex.

Regards,
Markus
Ranorex Support Team
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex doesn't find buttons when running without screen

Post by krstcs » Mon Oct 29, 2012 7:03 pm

Jakob,

In order for Ranorex to find UI objects, there must be a UI.

If you are running a headless VM (which is what it sounds like) then there is, by definition, no UI.

Ranorex is a UI automation tool, so using it in this manner would probably not be supported or expected. Instead, you should be starting the VM through the normal UI process, and then running the tests in the UI. You can even lock the HOST system (not the GUEST/TEST system) and the VM will still run the tests.

Hope this helps!

edit to add: Note that you must have at least a Runtime license installed on the VM in order for it to work as well. Otherwise, the pop-ups for the licensing will stop your tests and they will fail.
Shortcuts usually aren't...