Unable to grab screenshot of element when running in VMware

Ranorex Studio, Spy, Recorder, and Driver.
uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Unable to grab screenshot of element when running in VMware

Post by uhmdown » Mon Aug 21, 2017 3:07 pm

(Ranorex 7.1.0)

We are performing some screenshot comparisons of specific elements in a WPF C# application.

When we run this on the host machine, this works fine.
But when we deploy the testsuite to a VMware image, the screenshot mechanism causes the element to turn blank for a brief moment. The screenshot ends up being of this blank state, which is obviously unusable.

In this specific case, the element is a TabPage that contains a mix of buttons and Canvas items that draw graphs.
Its really strange that the entire element turns blank; it's almost as if the CompareImage method is refreshing the element right before it performs the capture.

We are using the "Validate.Options" class and the method "Validate.CompareImage( Element element, Bitmap image, Imaging.FindOptions findOptions)".


Has anybody seen anything like this?


I was considering taking screenshots with Windows Snipping Tool (automating it), but that won't work either, because for some reason Ranorex doesn't support diffing between screenshots (only between screenshot and an element). So unless there's a workaround for this, I basically have to abandon an entire set of core features in Ranorex.

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

Re: Unable to grab screenshot of element when running in VMware

Post by odklizec » Mon Aug 21, 2017 3:53 pm

Hi

Go to Settings >> Advanced tab and here uncheck Use hidden screenshot capturing option. This should help with black image on VM ;)
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

uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Re: Unable to grab screenshot of element when running in VMware

Post by uhmdown » Thu Aug 24, 2017 2:45 pm

Phew, it works. Thanks a lot.