Depending on which Ranorex.Imaging API I use the image I capture sometimes INcludes or EXcludes the tooltip!
When I use Ranorex.Validate.CompareImage, this takes a screenshot of my element EXcluding the tooltip. The screenshot I'm comparing it to INcludes the tooltip, so obviously the Ranorex.Validate.CompareImage call fails. At this point the .rxlog notes that the "Expected image" INcludes the tooltip, the "Searched Image" EXcludes the tooltip, and my "Difference images" correctly highlights the difference.
This was when I started calling the Ranorex.Imaging APIs individually to see what each did. I output the bitmap to the .rxlog file using:
Code: Select all
Report.LogData(ReportLevel.Info, "CaptureImage", bitmap);
* Ranorex.Imaging.CaptureCompressedImage INcludes the tooltip.
* Ranorex.Imaging.CaptureDesktopImage EXcludes the tooltip.
* Ranorex.Imaging.CaptureImage INcludes the tooltip.
* Ranorex.Imaging.CaptureDesktopImageWithSurroundArea didn't do what I expected it to.
* Ranorex.Imaging.CaptureImageAuto EXcludes the tooltip.
* Ranorex.Imaging.CaptureImageHidden EXcludes the tooltip.
Question: Is there any way to control how Ranorex.Validate.CompareImage acquires the screenshot of the element that I supply it? I'm guessing that it calls either CaptureDesktopImage, CaptureImageAuto or CaptureImageHidden.
I can of course use non-tooltip-sensitive Ranorex.Imaging API to grab the element's current screenshot and then Ranorex.Imaging.Compare to compare the two bitmaps directly, but this means I lose the excellent difference images that the Ranorex.Validate.CompareImage API offers.
Later I noted that it appears as though Ranorex.Imaging.Compare(Element, Bitmap) INcludes the tooltip, unlike Ranorex.Validate.CompareImage.