← Back to team overview

sikuli-driver team mailing list archive

[Question #265248]: exists(Pattern) finds something, but findall(Pattern) doesn't

 

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

Hi there,

strange problem. I'm strying to make an auto deleter for a manager program. It should find menu icons, right click them and then select delete. Sometimes the icons are not there but I would catch that with a simple "if exists(icon)", followed by a findAll algorithm clicking every icon. the code looks something like this:

    def deleteAllNodes(self):
        r = self.returnMenuColumn() #returns a region over the whole menu
        for icon in OEIconList:
            rPattern = Pattern(icon).exact() #Yes I tried with 0.7 and up, no change
            if r.exists(rPattern): #This sometimes works
                rFind = r.findAll(rPattern) #But then this doesn't which makes no sense

So for some reason the same pattern is found differently by exists and findAll.

Anyone have an explanation for this?

Thanks in advance!

Best,
David

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