Page 1 of 1

Blank image in spy's screenshot

Posted: Mon Mar 28, 2011 4:51 pm
by tallahassee101
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.

Re: Blank image in spy's screenshot

Posted: Tue Mar 29, 2011 9:06 am
by Support Team
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

Re: Blank image in spy's screenshot

Posted: Tue Mar 29, 2011 7:01 pm
by tallahassee101
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?

Re: Blank image in spy's screenshot

Posted: Tue Mar 29, 2011 7:57 pm
by Support Team
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

Re: Blank image in spy's screenshot

Posted: Tue Mar 29, 2011 9:50 pm
by tallahassee101
Alex,

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