sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #38022
Re: [Question #293475]: how to deal with visual differences between OS?
Question #293475 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293475
RaiMan proposed the following answer:
--- - when exist() doesn't find the zone at all ...
to make sure: we are talking about SikuliX 1.1.0 or even 1.1.1.
exists(someImage, time)
waits for maximum the time given and then simply comes back (other than find/wait, which through a FindFailed exception)
Be aware: the time value is specified as seconds.
--- - I didn't find the doc for getSub ...
you have to consult the JavaDocs for now, since Image will only be part of the official scripting API beginning with version 2
--- - is it possible not to be statistical ...
simply not with SikuliX. But even in your case this is not needed IMHO.
The challenge: even if all pixels are identical, you will not get an exact 1, it is always a fraction with more or less 9ers behind the comma (this is simply, because internally all is number crunching with floating point numbers and there you do not have exact integer values as result of operations with numbers having a fraction part. Integer results in case are produced by a suitable rounding algorithms).
So again: just decide wether score > 0.999999 or score > 0.9999999999 or whatever means equal to you.
Maybe it is a good idea, to run some test rows.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.