Ask general questions here.
4 posts • Page 1 of 1
Hi, I'm trying to validate an Element with an existing screenshot which is cropped. This results in that I have to crop the result image Validate.CompareImage takes. Currently I take a temporary snapshot and compare with that and then delete it, but I want to use Validate.CompareImage so it gets into the Report log. Got any ideas? Thanks.
You can also specify the crop rect in the FindOptions:
Code: Select all
Rectangle clipping = new Rectangle(0, 0, width, height); Ranorex.Imaging.FindOptions find_options = new Imaging.FindOptions(clipping); Ranorex.Validate.CompareImage(some_repo_item, expected_bitmap_image, find_options);