Blank image in spy's screenshot

Ask general questions here.
tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Blank image in spy's screenshot

Post by tallahassee101 » Mon Mar 28, 2011 4:51 pm

Hi,

We are trying to diagnose an issue with the spy not capturing any screenshots on an OpenGL rendered screen. We have a window in our application that we can enable/disable OpenGL drawing on and with OpenGL disabled we see the images in the screenshots, however with OpenGL enabled we see a black box.

When drawing a Polyline we do the following:

A - The OpenGL function making the drawing calls uses:
glVertex3i(GLint x, GLint y, GLint z)

B - The non-OpenGL function making the drawing calls uses (WinAPI):
::Polyline(__in HDC hdc, __in_ecount(cpt) CONST POINT *apt, __in int cpt)

Using A we see the lines drawn in the screenshot and using B we get an empty black box (the size of the image).

Our users typically use the OpenGL mode so we need to be testing in this mode and currently its impossible to test all of the items we draw on the screen.

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

Re: Blank image in spy's screenshot

Post by Support Team » Tue Mar 29, 2011 9:06 am

By default, Ranorex uses a special technique to capture screenshots of Win32 applications that usually also works when applications are not visible. You can disable that feature (General -> Advanced -> "Use hidden screenshot capturing (if possible)") in the Ranorex Settings so that "real" screenshots are always taken. Please, try if that helps. Thanks!

Regards,
Alex
Ranorex Team
.
Image

tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Re: Blank image in spy's screenshot

Post by tallahassee101 » Tue Mar 29, 2011 7:01 pm

Thank you. That solved our issue, however the screenshots taken are actually not the right size. It takes a 20x20 screenshot of an image on the screen that is probably 32x32. Do you know where in the accessibility of an object is that can be set?

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

Re: Blank image in spy's screenshot

Post by Support Team » Tue Mar 29, 2011 7:57 pm

tallahassee101 wrote:however the screenshots taken are actually not the right size
The size of the screenshot is defined by the size of the element. Ranorex just takes the size and location of the element and takes a screenshot from this position.
tallahassee101 wrote:Do you know where in the accessibility of an object is that can be set?
I'm not sure that I know what you mean. If the size of the element is wrong and you mean altering the MSAA implementation of your control, then you have to fix the implementation of the "accLocation" method.

Regards,
Alex
Ranorex Team
.
Image

tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Re: Blank image in spy's screenshot

Post by tallahassee101 » Tue Mar 29, 2011 9:50 pm

Alex,

Thank you the accLocation is the method implementation I was looking for. Thank you for helping solve my issue.