← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #160030]: [HowTo] sort matches returned from findAll()/Finder.find()

 

Question #160030 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/160030

Summary changed to:
[HowTo] sort matches returned from findAll()/Finder.find()

Description changed to:
**** possible solution:

SikuliScript/Jython/Python: see comment #1

Java: see comment #11

--------------------------------------------------------------------------

Hi,
i have a requirement like...
we have few Questions in screen & that questions are not fixed(its generated dynamically) & we have text boxes next to them to give answer...

So what i was doing is to get all string from that region using findAll
function & then store them in array & compair the question with actual
question from our database to get correct answer for them & then put
those answer in respective text boxes for all questions.

But String returned from findAll() function are not in order of their
occurrence in Screen,So here comes the problem.

Suppose Question are Actually in order of 1 to 5..
but findAll returns question(string) in order of 3,4,5,1,2..& more over this is not consistent..Some time it returns in some other order..

So when we put Answer in text box 1 for Question 1..then that is a wrong Answer because
that Answer is for question 3...because Question 3 was retrieved as 1st question...

So please help me out with this problem.

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