Skip to content

Require Tester to try visualClick on visible elements when locators fail#50

Merged
DavertMik merged 1 commit into
mainfrom
fix/tester-visualclick-fallback
Jun 4, 2026
Merged

Require Tester to try visualClick on visible elements when locators fail#50
DavertMik merged 1 commit into
mainfrom
fix/tester-visualclick-fallback

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

What

Strengthens one Tester rule: when a click() or locator repeatedly fails (not found, timeout, intercepted) on a target that is visible on the page, the Tester must now try visualClick() at least once before re-researching, switching targets, or concluding the element is unreachable.

- When click() fails and element is visually present, use visualClick() as fallback
+ When click() or a locator fails (not found, timeout, intercepted) on a target you can see on the page, you MUST try visualClick() at least once before re-researching, switching targets, or concluding the element is unreachable

Why

From a failed "Create new manual run" session: the Researcher's UI map mislabeled the primary action (a phantom New Run (+) button in a non-existent .layout-header container), so every locator chased nothing. Vision actually knew the truth — see() reported "the blue button labeled 'Manual Run' likely triggers the creation" — but the Tester never converted that into a visualClick and instead exhausted broken locators, then wrongly concluded the feature did not exist. The existing rule to fall back to visualClick was too soft and got skipped.

Scoped to the Tester only (the sole agent with visualClick; locatorRule is shared with Navigator/Researcher/Driller and was left untouched). The visualClick tool already guides describing elements by visible appearance, so no duplication.

Verification

  • bun test tests/integration/ — 62 pass / 0 fail
  • bun run format / bun run check:fix — clean

🤖 Generated with Claude Code

@DavertMik DavertMik force-pushed the fix/tester-visualclick-fallback branch from c98afa7 to 12fdf76 Compare June 4, 2026 15:51
When a click or locator repeatedly fails (not found, timeout, intercepted)
on a target that is visible on the page, the Tester must now attempt
visualClick at least once before re-researching, switching targets, or
concluding the element is unreachable. The prior rule was a soft "use as
fallback" and got skipped, letting the Tester exhaust broken locators and
wrongly decide a visible control did not exist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DavertMik DavertMik force-pushed the fix/tester-visualclick-fallback branch from 12fdf76 to e358dd3 Compare June 4, 2026 15:55
@DavertMik DavertMik merged commit 2fedae4 into main Jun 4, 2026
2 checks passed
@DavertMik DavertMik deleted the fix/tester-visualclick-fallback branch June 4, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant