How To: Compare Between this two image

Best practices, code snippets for common functionality, examples, and guidelines.
hc123
Posts: 11
Joined: Tue Nov 09, 2021 9:08 am

How To: Compare Between this two image

Post by hc123 » Tue Nov 09, 2021 9:20 am

Hello,

How to do comparison between these two images using CompareImage action? I always get a successful confirmation even though the image is different.

https://ibb.co/NThm1tb
Last edited by hc123 on Sun Nov 21, 2021 2:49 pm, edited 1 time in total.

Jacob
Certified Professional
Certified Professional
Posts: 120
Joined: Mon Mar 22, 2021 10:01 pm

Re: How To: Compare Between this two image

Post by Jacob » Thu Nov 11, 2021 7:02 pm

Hi hc123!

I would recommend checking out the documentation here. It goes into full detail on the image-based testing process.

--Jacob
Image

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

Re: How To: Compare Between this two image

Post by odklizec » Fri Nov 12, 2021 8:18 am

Hi,

Have you tried to change the Similarity level to something like 98 or 99? Also, without seeing the images you are comparing (both source and reference), it's hard to tell what's wrong. But keep in mind that the image validation should be used for small images, not entire screens ;) It's definitely not a good idea to compare something like entire desktop.
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

hc123
Posts: 11
Joined: Tue Nov 09, 2021 9:08 am

Re: How To: Compare Between this two image

Post by hc123 » Tue Nov 23, 2021 10:38 am

Thanks I have solved this issue by using a very precise Similarity level near to 1