[🚀 Feature]: Add support for chrome-headless-shell to Selenium Manager

Open
#16,276 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
tooling

Research direction

Start by reading Selenium Manager's existing Chrome detection and download handling, then trace how browser options reach Selenium implementations. Compare standalone chrome-headless-shell support with fetching both binaries; done means the selected approach downloads and resolves the matching binary reliably across supported platforms, with Selenium-side handling addressed as needed.

Written by the indexing model from the issue text.

Description

B-manager I-enhancement
Background

Previously it was decided in #13600 (2024-03) that chrome-headless-shell shall not be supported by Selenium Manager, due to it being part of the main chrome binary.

There's nothing separate to download, it's part of the Chrome installation, and there's not a good reason to support this independently.

This is no longer true, as --headless=old is no longer supported as of Chrome 132 (2025-01-14):

We're happy to announce that the old Headless mode will be removed in Chrome 132.

And:

If you are using old Headless functionality you should now migrate to chrome-headless-shell (to retain old Headless functionality) or to the new Headless mode, which continues to be provided by the Chrome binary.

While new headless mode is suitable for full CI testing, the old headless mode is significantly faster, making it a much better fit for iterative TDD testing when browser interactions are under test.

Feature Request

Selenium Manager should either:

  • fetch both binaries when chrome is specified

or

  • provide support for chrome-headless-shell as a standalone browser option

In either case, it seems likely that Selenium implementations will also need to adjust to handle the separate binaries (perhaps by noticing --headless=old and switching binaries?), but that seems like a secondary task dependent on SM supporting autodownloads of both binaries.

Have you considered any alternatives or workarounds?

The current workaround I've come up with is to install the chrome-headless-shell binary myself, and specify that as the binary to use when running Selenium. eg.

browser_options = Selenium::WebDriver::Chrome::Options.new
browser_options.binary = '/some/path/to/binary/chrome-headless-shell'

# Using Capybara + Selenium, but the point applies regardless of testing engine
Capybara::Selenium::Driver.new(app, browser: :chrome_headless_shell, options: browser_options)

I've put together a rickety emulation of SM's autodownload behaviour that attempts to match the installed Chrome version, but makes no attempt to be cross-platform nor support most browsers.

This is obviously not as robust as Selenium Manager handling it properly, but it does work for now and avoids a hardcoded local path and (some) manual updates.

Dominant language
Java
Stars
34.6k
Forks
8.7k
Avg merge
1d 16h
Merged PRs (30d)
107

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SeleniumHQ/selenium

All issues in SeleniumHQ/selenium

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.