How to handle image pattern find between systems

Asked by Vincent Yau

I am almost done using Sikulix to drive a website using a browser on Linux. I found that
the image pattern captured using one browser is not usable on another one. Say I capture some image patterns (for has() or exists() etc...) using Chrome, those same images cannot be used on Firefox.

Not only do I need to support different browsers, I also need to support between Mac and Linux.

In general, are tips on how I can recycle these images patterns and use them cross browsers and OS?

thanks

-vincent

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Vincent Yau
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Sorry, but this will always be a problem with SikuliX with its pixel-based approach.

there are 2 conditions:

--1: the image searched on the target system must be shown with the same size in pixels (width and height)

--2: the pixels must be the same with respect to their RGB value.

condition 1 is a must, whereas condition 2 might not be matched exactly, which leads to lower similarity scores, the less pixels are identical.

condition 1 should usually be possible to meet by a correct graphical setup.

how good condition 2 can be met, depends on the rendering process of the system/application. If the rendering implementation is the same, one will get the same image on the current screen as that captured on another screen. One example is the handling of edges in image (anti-aliasing). another is the background-problem: on another system the background is different (e.g. GUI setup) and the captute contains too much background (should be less than 10 - 12% of the pixels).

So if condition 2 cannot be met, then you need a different image set for every different rendering situation.

Revision history for this message
Vincent Yau (vyau6789) said :
#2

thanks