Skip to content

Bug 2099811 - [firefox-mcp] Report clicks that do not reach their element - #260

Draft
juliandescottes wants to merge 1 commit into
mozilla:mainfrom
juliandescottes:click-by-uid-lost-click
Draft

juliandescottes wants to merge 1 commit into
mozilla:mainfrom
juliandescottes:click-by-uid-lost-click

Conversation

@juliandescottes

Copy link
Copy Markdown
Collaborator

Tracks Bugzilla 2099811.

click_by_uid always reported success, even when no click event reached the element. This happens when the page moves or replaces the element during the click, or when another element (an overlay) receives the pointer events.

Changes:

  • Before the pointer actions, clickByUid counts the click events that reach the element (or a descendant), from a sandbox the page cannot see.
  • When none arrived, the tool fails with the reason and a next step: the element was removed or replaced, it is disabled, or another element received the click.
  • A click that navigates still succeeds: the sandbox is gone, so the count is skipped.

Behavior changes for review:

  • A click on a disabled element used to succeed silently. It is now an error.
  • Each click runs two more script calls.

Tests: new tests/integration/firefox/click.test.ts. The three report cases fail without the fix. The full suite passes locally.

…ment

click_by_uid sent the pointer actions and always reported success. When
the page moved or replaced the element during the click, or another
element received the pointer events, no click event reached the element,
and the agent could not tell why nothing happened.

Count the click events that reach the element from a sandbox, and fail
with the reason and a next step when none arrived. The new tests fail
without the fix.
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