cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare image quite independent from screen resolution

SOLVED
Highlighted
Occasional Contributor

How to compare image quite independent from screen resolution

Hi all,

 

I'm simply using Image comparison, through Regions Check method, to check if an image is equal to the one saved into Regions Store.

But I've issues if the screen resolution is different from the one when I've saved the image into Regions; for example: if the monitor is changed, I must use a different image (saved on a screen with the same resolution) to have the test passed.

How can I do a Image comparison in a way quite independent from the screen resolution? 

 

Thanks

Simona

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to compare image quite independent from screen resolution

There are a lot of things here that can affect your comparison, including resolution.  Take a look and see what you can adjust.

https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/regions/factors-affecting-i...

 

View solution in original post

5 REPLIES 5
Highlighted
Occasional Contributor

Re: How to compare image quite independent from screen resolution

Hi,

If your images are based on coordinates:
I think it's impossible. I have a lot of tests with the region checkpoints and the only thing you can do is set a proper resolution and DPI before testing. You should decide what display settings you'll use before the testing (it will be your testing environment) e.g. screen resolution 1080p and scale 125%.
So you should use the same display settings on all testing machines. Another option probably is to configure your project to automatically change screen or browser resolution before you start running the tests.
It's impossible to compare region checkpoints on different resolutions because once you change your resolution you change your coordinates too (that's because of pixel density)

If your images are not based on coordinates:
You can use the stretch method to resize your images https://support.smartbear.com/testcomplete/docs/reference/program-objects/picture/stretch.html 

Highlighted
Community Hero

Re: How to compare image quite independent from screen resolution

There are a lot of things here that can affect your comparison, including resolution.  Take a look and see what you can adjust.

https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/regions/factors-affecting-i...

 

View solution in original post

Highlighted
Occasional Contributor

Re: How to compare image quite independent from screen resolution

Hi @TMbet , how can I understand if my image is "based on coordinates"? 

I've saved it to the Regions using the checkpoint feature of test script recording (it is a Web test, so the image is displayed on the browser).

Highlighted
Community Hero

Re: How to compare image quite independent from screen resolution

Hi Simona,

 

Consider services like Applitools Eyes (accessible standalone and is integrated with SmartBear's CrossBrowserTesting (CBT)).

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Manager

Re: How to compare image quite independent from screen resolution

Thank you for a lot of great suggestions, Community!

 

@simonaferrara please mark the reply that helped you as a solution🙂


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors