[request] findAll() should only return the most probable matches
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Fix Released
|
High
|
RaiMan |
Bug Description
--- request (based on the primary bug situation)
valuable test information below in comment #5 +
findAll(): "most probable" means, that only those matches are returned, whose score differ only slightly from that of the best match (e.g. max 0.3 or even less). This surely is the expectation of most people, when using findAll().
Additionally it might make sense, to implement a findAny(), that returns ALL matches having a score above the given similarity, because this might be the expected result in some situations, when using findAll() in its current shape.
-------
1. Sikuli 1.0 rc3
2. Windows XP SP3 32-bit
3. Enclosed code loops over all "Apply" boxes. Once apply has been clicked it wait for a confirmation box to appear, confirms, waits for the confirmation box to disappear. The final match does not point to the bitmap.
4. Required bitmaps attached.
# setFindFailedRe
setROI(Screen(0))
applies = findAll(
for apply in applies:
click(apply)
confirm=
wait(confirm)
click(
waitVanish(
description: | updated |
Changed in sikuli: | |
status: | New → In Progress |
assignee: | nobody → RaiMan (raimund-hocke) |
importance: | Wishlist → Medium |
tags: |
added: fkt-region removed: findall match |
Changed in sikuli: | |
importance: | Medium → High |
milestone: | none → x1.1 |
tags: | added: todo |
Changed in sikuli: | |
milestone: | 1.1.0 → 1.2.0 |
Changed in sikuli: | |
status: | In Progress → Fix Released |
milestone: | 2.0.0 → none |
I do not think, that this is a bug, but ...
To analyze the situation pls. attach a screenshot too. This makes it possible to see, what really happens.
There might be similar things on the screen, that are matched with findAll(), but with a lower similarity.
so you might try:
applies = findAll( Pattern( "Apply. png").similar( 0.9))
Other general things:
- capture as little background as possible. The red apply button should only contain the text "Apply".
- If possible narrow the search region to the area, where the apply buttons appear and use reg.findAll()