Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

Commit

Permalink
fixed: findAll() should throw FindFailed according docs and support F…
Browse files Browse the repository at this point in the history
…indFailed Response handling.
  • Loading branch information
RaiMan committed Mar 29, 2017
1 parent 941d719 commit 60efa57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion API/src/main/java/org/sikuli/script/Region.java
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,7 @@ public <PSI> Iterator<Match> findAll(PSI target) throws FindFailed {
runTime.abortScripting("FindAll: Abort:", "ImageMissing: " + target.toString());
}
}
if (null != response && response) {
while (null != response && response) {
log(lvl, "findAll: waiting %.1f secs for (multiple) %s to appear in %s",
autoWaitTimeout, targetStr, this.toStringShort());
if (autoWaitTimeout > 0) {
Expand All @@ -2466,10 +2466,15 @@ public <PSI> Iterator<Match> findAll(PSI target) throws FindFailed {
}
if (lastMatches != null) {
log(lvl, "findAll: %s has appeared", targetStr);
break;
} else {
log(lvl, "findAll: %s did not appear", targetStr);
response = handleFindFailed(target, img, false);
}
}
if (null == response) {
throw new FindFailed(FindFailed.createdefault(this, img));
}
return lastMatches;
}

Expand Down

0 comments on commit 60efa57

Please sign in to comment.