← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #384265]: Unable to find images on identical monitors

 

Question #384265 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/384265

RaiMan proposed the following answer:
Ok, that is what I expected.

Having text in the images to be searched for is a big problem for
SikuliX, caused by the pixel-based approach, if you try to use the
workflow in different environments (different rendering, different fonts
and even different languages).

If possible, one should always try to search with patterns, that promise to be the same in different environments.
One approach is to search for one textless part of the image (even with findAll()) and then check the result  with another textless part of the image, to get the match you are looking for.
A good example is a button, that has different text in different environments.

Another possible approach is to use relative coordinates as often as
possible, which works in situations, where at least parts of the GUI is
fixed according to the coordinates of the contained elements. Search one
fixed element and act on others based on their offset.

Lowering the matching threshold might work in some situations, but
always has the risk of false positives.

Hope you get your way.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.