← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #208949]: Expected behaviour of region after it's been changed

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
absolutely right:
A Region object (however it is created) is a geometric thing, that does not change its position and dimension by itself and does not repeat any find operations, that might have created the region.

So as long, as you do not change your variable x, it will always
reference the same area on the screen, no matter which content it might
have later on.

So the problem might be the dimension of the region x.below(45), that might not contain your image completely, so it fails.
So check your captured <img2> and either make it smaller or extend the below() value.

as a check, you might highlight the area:
x.below(45).highlight(3)
This might help, to see the position/dimension of x.below(45), which is:
Region(x.x, x.y+x.h, x.w, 45)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.