sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33226
[Question #268554]: findAll() after PAGE_DOWN does not work
New question #268554 on Sikuli:
https://answers.launchpad.net/sikuli/+question/268554
I am accessing a long webpage that has several checkboxes. I use findAll() to find boxes that are unchecked, then iterate the findAll enumerator to pull found objects into an array and that works great! However, when I page down and repeat the process it doesn't work. It seems the original findAll() enumerator info is not refreshed. I have used destroy() and set variables to nil, but it still acts on the first findAll() information. I am using Ruby/Sikuli/MAC OS 10.9.5:
def sortIcons
icons = findAll(image)
@mm = []
while icons.hasNext()
@mm << icons.next()
end
icons.destroy() #this apparently does nothing
icons = nil #or this
@mm.sort! { |a,b| a.getY() <=> b.getY() }
doHover
end
def doHover
@mm.each do |i|
hover(i) #more processing here....
end
@mm = nil
end
i = 0
while i < 2 #loop more times after condition test
sortIcons
type(Key.PAGE_DOWN)
i += 1
end
Thank you,
Scott
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.