[HowTo] Running sikuli script on different machines - image search fails
----------------- reasons, pitfalls and rules
Based on how SikuliX works:
http://
the only conditions needed, to be able to use the same images on other machines:
- the image must be present in a screenshot on the other machines in the same size (width x height) measured in pixels
- and the pixels must have the same content (to a high degree at least)
The first condition is usually met, if screen dimension measured in pixels and the resulting rendering has the same width-height-ratio as the original system. Though depending on resolution (dpi), the images might look smaller or larger, but are found by SikuliX.
The second condition depends on several aspects of the other system:
- if GUI-themes differ at the pixel level (colors, edges, button-design, ...)
- if apps like browsers do a different rendering on other machines
- other aspects, that influence, how something is displayed on a screen at the pixel level (e.g. anti-aliasing with fonts, ...)
So if you plan to use the same image set on different machines, just decide for a few base images, that are used for a compatibility test, before running into problems with a complex workflow, that is not designed to handle not-found-
In the worst case, you have to be prepared to recapture your images on the other machines and work with image sets, that are switched according to the situation on the current machine.
... and obey the "Golden Rule" of SikuliX:
A capture should have as little background at the edges as possible (less than 20% counted in pixels) and should concentrate on the unique aspects of the image.
-------
Why sikuli script fail when I run it on different machines? Does running it on big monitors or small monitors create any difference?
More Details:
I have integrated sikuli with Eclipse and used the Screen class to automate my application.
Kindly help.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- RaiMan Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Prabhat Saxena for more information if necessary.