Skip to content

fix(admin): open Chrome inspect page on Windows#374

Open
honor2030 wants to merge 1 commit into
browser-use:mainfrom
honor2030:fix/windows-chrome-inspect-open
Open

fix(admin): open Chrome inspect page on Windows#374
honor2030 wants to merge 1 commit into
browser-use:mainfrom
honor2030:fix/windows-chrome-inspect-open

Conversation

@honor2030
Copy link
Copy Markdown

@honor2030 honor2030 commented May 18, 2026

Summary

  • open chrome://inspect/#remote-debugging through the Chrome executable on Windows
  • keep the existing macOS AppleScript path and webbrowser.open() fallback for other cases
  • add Windows unit coverage for executable launch and missing-Chrome fallback

Test Plan

  • RED: uv run --with pytest --with pillow python -m pytest tests/unit/test_admin.py::test_open_chrome_inspect_uses_chrome_executable_on_windows -q failed before the fix because Windows still called webbrowser.open()
  • GREEN: uv run --with pytest --with pillow python -m pytest tests/unit/test_admin.py::test_open_chrome_inspect_uses_chrome_executable_on_windows tests/unit/test_admin.py::test_open_chrome_inspect_falls_back_to_webbrowser_when_windows_chrome_missing -q
  • GREEN: uv run --with pytest --with pillow python -m pytest tests/unit/test_admin.py -q
  • GREEN: uv run --with pytest --with pillow python -m pytest tests/unit -q
  • GREEN: uv run python -m compileall -q src tests
  • GREEN: git diff --check

Closes #290


Summary by cubic

Fixes opening the Chrome inspect page on Windows by launching chrome://inspect/#remote-debugging via the Chrome executable. Falls back to webbrowser.open() when Chrome isn’t found; macOS AppleScript path remains unchanged.

  • Bug Fixes
    • Windows: find chrome.exe in PROGRAMFILES, PROGRAMFILES(X86), or LOCALAPPDATA and launch the URL directly.
    • Fallback to webbrowser.open(url, new=2) if Chrome is missing or launch fails.
    • Added unit tests for Windows launch and fallback behavior.

Written for commit eaf6704. Summary will update on new commits. Review in cubic

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

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.

fix: _open_chrome_inspect() fails on Windows — webbrowser.open() can't handle chrome:// protocol

1 participant