I am currently working on a test where an image appears on the screen with some text on it (ExpectedImage). The background of this image can vary depending on different states of the system. I am only interested in the text present irrespective of the background color. Hence I created a monochrome mask image (MaskImage). When the image appears on the screen during the course of the test (ActualImage), I expected it to pass due to the use of mask picture. But the test fails with the difference in images shown as in DifferenceImage.
Can any one please help me understand why this is failing ? Is my understanding of usage of masking incorrect ?
(Attached project with the images as described in the issue)
Solved! Go to Solution.
The second parameter which indicates "transparency" (see https://support.smartbear.com/testcomplete/docs/reference/program-objects/picture/compare.html) you have set to true. Set that to false. I had a similar issue when using a mask. That ONLY applies when you actually have a "transparent" background in your main image. Everything else SHOULD work.
Thanks for the response. I did try by setting the transparency parameter to false, but it still did not work. I had raised the same with the support team and have received a response as to the masked image having contour pixels in it (its visible when zoomed to 800%). I have decided to make use of Transparent images (so no background) and that is working.
I'm happy to hear that the question is resolved. I've marked your reply as a solution so that other members could find the answer faster!