← Back to team overview

sikuli-driver team mailing list archive

[Question #355875]: how to use FindAll in a loop

 

New question #355875 on Sikuli:
https://answers.launchpad.net/sikuli/+question/355875

Hi!

findAll function is really nice, however I want to use it a bit of a different purpose.
I am trying to findAll checkboxes on screen, but only click a few of them.

I understand that the findAll function will return all locations of the images found 

count = 0
findAll("checkbox")
for x in findAll("checkbox"):
    while count < 5:
        click(x)
        count = count +1

It actually works, but it clicks on the same location five times.
I've tried other functions, to use this loop, but these will return an error indicating that the object is not iterable.

Hope you could help me out.
Could not find an answer in an earlier raised question similar to this one, if the answer is there, hope you could link this page for me.

Thanks.



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