sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03098
[Question #160542]: Every time only 2 objects are returned from findAll function
New question #160542 on Sikuli:
https://answers.launchpad.net/sikuli/+question/160542
Choose.png &Choose1.png are the Images to be searched in Screen.
which has 4 similar Objects..& find all Shud return 4 different regions.
But instead it returns only 2 matched region.
please have a look at it & help me.
If you need those images..please let me know,where & how can i send it??
JAVA CODE::
String qlist = new String();
Pattern QTextbox = new Pattern(imagePath + "android/imgs/Choose.png");
QTextbox.similar((float) 0.3);
Iterator<Match> match=s.findAll(QTextbox);
Pattern QTextbox1 = new Pattern(imagePath + "android/imgs/Choose1.png");
QTextbox1.similar((float) 0.3);
Iterator<Match> match1=s.findAll(QTextbox1);
Region Rfind = null;
System.out.println("\n New Serach");
for(int i=0;i<numOfQuestionsToBeCreated;i++)
{
qlist=match.next().text();
System.out.println("\nStrings : " + qlist);
Rfind =match.next().inside();
System.out.println("Region Returned :"+i+"= " + Rfind);
Rfind.click(QTextbox,0);
if(!match.hasNext())
break;
}
for(int i=0;i<numOfQuestionsToBeCreated;i++)
{
qlist=match1.next().text();
System.out.println("Strings : " + qlist);
Rfind =match1.next().inside();
System.out.println("\nRegion Returned :"+i+"= " + Rfind);
Rfind.click(QTextbox1,0);
if(!match1.hasNext())
break;
}
Console OUTPUT For Above code::
New Serach
Strings : Choosea question ~
Region Returned :0= Match[677,373 124x14] score=0.97, target=center
Using substitute bounding box at (222,2)->(239,5)
PyramidTemplateMatcher: source is smaller than the target
[log] CLICK on (739,380)
Strings : Choosea question
Region Returned :1= Match[677,332 124x14] score=0.92, target=center
[log] CLICK on (739,339)
PyramidTemplateMatcher: source is smaller than the target
Strings : (`hnnsea nuestinn
Region Returned :0= Match[677,414 109x13] score=0.98, target=center
PyramidTemplateMatcher: source is smaller than the target
[log] CLICK on (731,420)
Strings : fhnncnA nuncrinn
Region Returned :1= Match[677,331 109x13] score=0.92, target=center
PyramidTemplateMatcher: source is smaller than the target
[log] CLICK on (731,337)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.