Skip to content

Don't open the context menu in the right click fixture - #120

Open
aik099 wants to merge 1 commit into
minkphp:masterfrom
aik099:fix-context-menu
Open

aik099 wants to merge 1 commit into
minkphp:masterfrom
aik099:fix-context-menu

Conversation

@aik099

@aik099 aik099 commented Oct 24, 2026

Copy link
Copy Markdown
Member

The contextmenu handler in js_test.html doesn't prevent the default action, so testRightClick opens the browser's own context menu and leaves it open.

With headed Chromium-based browsers on macOS that menu blocks the next test: SessionResetTest::testSessionResetClosesWindows waits until it's closed by hand, or fails with "failed to close window in 20 seconds".

The handler now returns false, so no menu is opened. The test still checks that the event was fired.

Tested locally with webdriver-classic-driver on Selenium 3.141.59 (--filter 'testRightClick|SessionResetTest'):

  • Brave (as Chrome): passes in 2s, before it failed after ~21s;
  • Firefox: passes.

🤖 Generated with Claude Code

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