sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33858
[Question #269494]: While Loop with region.exists(IMG) doing more loops than needed
New question #269494 on Sikuli:
https://answers.launchpad.net/sikuli/+question/269494
This question might be easier for em to understand what am I doing wrong (and with ebtter feedback since I'll be using my own laptop for this.
I'm doing the following while loop:
while r.exists(img1):
t = r.find(img1)
dragDrop(t, img2)
where r is a region I set like this: r = find(img3).below()
img1 appear more than once in the r region I defined
img2 is an area outside the r region
(Dunno If I told unecessary stuff but rather add than ommit)
But when I check the log I'm creating, what I got is a FindFailed, informing that it can't find img1 on the screen.
added a simple counter to check how many times I'm doing the loop. It was expected that this loop would occur 16 times, but is doign at least 17 (probably would happen again, but it stops on 17 tries)
Assuming the while was wrong, tried to fix it, check the preview and only the 16 targets I wanted are being compared in the preview.
By now I'm using a second route for my test to work (since I know there is only 16, I'm doing a loop limited up to 16 times), bur would liek to udnerstand what I'm missing to fix the first idea I had.
Thanksm,
Augusto.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.