Black/Blank Screenshots

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
TPeter
Posts: 5
Joined: Mon Nov 20, 2017 9:22 am

Black/Blank Screenshots

Post by TPeter » Mon Nov 20, 2017 9:55 am

We run Ranorex nightly against our SUT on a build server.
Usually, the build succeeds but sometimes Ranorex doesn't see anything e.g. takes black/blank screenshots (See attachement for example).

We found out that if we disconnect all RDP-Sessions on the build server, it works again. But since some days, this does not help anymore (we didn't update Ranorex during this time so this is not a new "bug" introduced).
We tried restarting of course, but this did not help either.

We were able to recreate this with logging in on the build server via RDP, but as I said we can't get the tests running again and thus we are not able to reproduce it.

Is this a known problem and are there any solutions?

Thank you for your help!

Build Server: Windows Server 2016 Standard
Ranorex Version: 7.2.0
Attachments
BlackScreenshot.png
Blank screenshot in the Ranorex report.
BlackScreenshot.png (7.82 KiB) Viewed 556 times

TPeter
Posts: 5
Joined: Mon Nov 20, 2017 9:22 am

Re: Black/Blank Screenshots

Post by TPeter » Tue Nov 21, 2017 9:51 am

We found that the problem was that the TeamCity Service mustn't run as a service. When we start it directly, the problem is fixable again.

However, we still get black screenshots when we connect to the build server with RDP. But now we can delete open connections or restart the server to get the tests running again.

Still asking though, is it possible that we don't have to go through this procedure everytime after we've logged in on the buildserver?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Black/Blank Screenshots

Post by odklizec » Tue Nov 21, 2017 10:38 am

Hi,

The problem with Remote Desktop connection is, that it must not be closed or even minimized while running automated test! If you do either action, RD locks the remote screen and hence Ranorex cannot access the UI elements. For successful UI test automation, the desktop must be unlocked. I remember there was a discussion about a RD hack, which allows to close/minimize RD window. Just search the forum for RD topics. Or you can simply dump the RD and use some kind of VNC tool, which keeps the desktop unlocked after minimizing/closing VNC dialog.

And yes, you must not run TeamCity (Jenkins and any other CI tool) as a service. It's clearly described in Team City integration guide (Windows service does not have sufficient rights to start UI-applications)...
https://www.ranorex.com/blog/integratin ... i-process/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

TPeter
Posts: 5
Joined: Mon Nov 20, 2017 9:22 am

Re: Black/Blank Screenshots

Post by TPeter » Tue Nov 21, 2017 11:30 am

Thank you for your reply!

Just to clarify, there was no connection opened to start the tests nor while the tests were running.
But apparently there must not be any RDP-connection (neither opened nor closed) existing on the server.

Thanks again for the clarifications!