findAll() after PAGE_DOWN does not work
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(
i += 1
end
Thank you,
Scott
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: