[check] findAll(text) returns only one match of many possible matches

Bug #1419488 reported by RaiMan
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Medium
RaiMan

Bug Description

Hi all,

I opened TextEdit, and typed in the following:
Test
Test
Jump
Jump and Run

Then, I use the following code to find the text "jump", expecting that it will return 2 results. But I only got one.
Here is the code (in Java)
     int count = 0;
     Iterator<Match> matches = App.focusedWindow().findAll("Jump") // or Test
     while(matches.hasNext()) {
         Match m = matches.next();
         m.highlight(2);
         ++count;
     }

Only the first Jump was highlighted (count = 1)

Is there a way for me to find the 2 "Jump"

Thanks,
kai

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 2.0.0
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 2.0.0 → 2.0.1
summary: - [1.1.0] findAll(text) returns only one match of many possible matches
+ [check] findAll(text) returns only one match of many possible matches
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.