You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
find_all returns before waiting for a later screenshot match #71
DesktopBot.find_all returns immediately when its first screenshot contains no match, even if waiting_time has not expired. The loop checks if not eles, but locate_all_opencv returns a generator, and an empty generator object is truthy. The retry path is skipped and the call returns an empty list rather than trying a later screenshot. The current main branch at 9d5deaa89520c6e4cec61248f2c0c71931160866 reproduces this using a stubbed screenshot sequence.
Expected behavior
find_all should keep checking screenshots until it finds matches or the configured waiting_time is exhausted.
Steps to Reproduce
Call DesktopBot.find_all with a positive waiting_time.
Stub get_screenshot to return two images without the target, followed by an image with the target.
Observe that main returns [] after the first screenshot instead of finding the later target.
The regression test on existing PR #69 exercises this sequence without a physical screen.
Possible Solution
Materialize the locate_all_opencv generator before checking whether it contains matches, so an empty result continues the wait loop.
My Platform
Observed on repository main at 9d5deaa89520c6e4cec61248f2c0c71931160866; reproduction uses a stubbed screenshot sequence and does not require a physical display. Exact first affected package release is not established.
Additional context
This ticket is being filed to track already-open PR #69, which predates it, and make the contribution issue reference explicit. Issue #50 covers duplicate detections in find_all, not the wait/retry behavior described here.
This contribution was prepared with AI assistance by breken-ai.
Activity