Skip to content

Move the Selenium MCP server here from SeleniumHQ/selenium - #1

Merged
AutomatedTester merged 4 commits into
trunkfrom
claude/project-thread-5pf5d7
Nov 9, 2026
Merged

AutomatedTester merged 4 commits into
trunkfrom
claude/project-thread-5pf5d7

Conversation

@AutomatedTester

Copy link
Copy Markdown
Member

Requested by David · project thread

What this does

Brings @selenium/mcp (bin selenium-mcp) over from javascript/selenium-mcp in SeleniumHQ/selenium, as of trunk b74be3e. That covers v0 (SeleniumHQ/selenium#18280), v1 part 1 (SeleniumHQ/selenium#18284) and Diego's Windows upload test fix (SeleniumHQ/selenium#18289).

History is kept. The first three commits are git subtree split of that directory, with the original authors, and the PR references rewritten to SeleniumHQ/selenium#N so they don't point at nonexistent PRs here. Use Rebase and merge to keep them; a squash merge collapses them into one.

The last commit makes it a plain npm package:

  • BUILD.bazel is replaced by npm scripts (lint, test:unit, test:e2e, format) and .github/workflows/ci.yml, which runs lint, unit tests and the Chrome browser tests on Node 22 and 24.
  • The four bindings test pages the browser tests open (login, iframes, formPage, alerts) are copied into test/fixtures/common/; the Bazel runfiles lookup is gone.
  • Package metadata points at this repo, LICENSE/NOTICE ship in the package, and CONTRIBUTING.md defers to the Selenium guide.

Things to decide

  • selenium-webdriver dependency. The server needs getAccessibilitySnapshot(), which first ships in selenium-webdriver 4.53.0 (npm has 4.52.0). Until then the dependency is npm:@seleniumhq/selenium-webdriver@^4.53.0-0, the nightly in GitHub Packages, and .npmrc maps the scope there. Installing needs a token with read:packages (CI uses GITHUB_TOKEN). Once 4.53.0 is out, switch to "selenium-webdriver": "^4.53.0" and delete .npmrc. Don't publish before that.
  • Version. It used to release in lockstep with the bindings (4.53.0). Here it starts at 0.1.0 and versions on its own; change it if you'd rather keep lockstep.
  • No lockfile yet, because it can't be generated without GitHub Packages access from where this was built. Commit one after the first install.
  • trunk got a one-commit "Initial commit" (LICENSE, NOTICE, README stub) so this PR has a base.

Testing

Locally, against selenium-webdriver built from selenium trunk (atom bundled with esbuild): npm run lint clean, 69 unit tests and 44 Chrome browser tests passing. CI here will be the first run against the real nightly package.

The follow-up that removes javascript/selenium-mcp from SeleniumHQ/selenium should merge only after this one.

🤖 AI assistance

Prepared with Claude Code: history extraction, standalone build and CI, and local test runs. Reviewed by the requester before merge.


Generated by Claude Code

AutomatedTester and others added 4 commits November 9, 2026 14:40
…eleniumHQ/selenium#18284)

* [js] Add drag, upload, network tools to MCP

First part of v1 for @selenium/mcp: the default tools the plan adds,
named and shaped as @playwright/mcp has them.

- browser_drag drops one ref on another with pointer actions; refs in
  different frames are refused.
- browser_file_upload accepts the file input, its label, or the button
  that opens a hidden input. Paths must be inside the working directory
  unless --allow-unrestricted-file-access is given. On a Grid, a file
  detector sends the local file to the node.
- browser_resize sets the window size.
- browser_network_requests lists requests since the page loaded over
  BiDi, leaving out successful static resources unless asked.
- browser_evaluate is offered only with --allow-evaluate.

Console and network events now go through the BiDi connection's
addCallback. bidi/logInspector reads every message as a log entry and
throws on network events, and bidi/network passes every network event
to every callback.

The default tool list is 20, inside the v1 gate of 25.

* [js] Fix MCP Grid multi-file upload and test

The bindings' file detector handles one path, so on a Grid the joined
paths of a multiple-file upload were sent to the node untransferred.
Send each file to the node first, then type the remote paths.

The outside-directory e2e test used /etc/hostname, which does not exist
on Windows; it now writes its own file in the temp directory.
…nium#18289)

* [py][rb][js] Fix tests failing in the nightly CI run

- py: navigate to the result page with click() instead of submit(); after a
  scripted submit, safaridriver's Forward command does not navigate
- rb: wait for the result page title after submit, since Safari updates the
  URL before the title
- rb: only keep the Safari pending guard on the input specs that still fail,
  as Safari Technology Preview now handles the key action ones
- rb: mark the accessibility snapshot specs pending on Safari Technology Preview
- rb: limit the setTextLayoutModeOverride pending guard to Chrome, as Edge
  supports it now
- js: run the MCP upload tests from a temp directory with real fixture copies;
  Bazel runfiles on Windows are symlinks whose real path is outside the working
  directory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [js] Remove the temp fixture directory after the MCP upload tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [rb] Keep the setTextLayoutModeOverride guard for the pinned Edge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The server moves here from javascript/selenium-mcp in
SeleniumHQ/selenium, so it can no longer lean on that repository's
Bazel build, workspace bindings or shared test pages.

- Replace BUILD.bazel with npm scripts for lint, unit and browser
  tests, and a GitHub Actions workflow that runs them against Chrome.
- Depend on the nightly selenium-webdriver from GitHub Packages until
  4.53.0, the first release with getAccessibilitySnapshot(), is on npm.
- Copy the four bindings test pages the browser tests open into
  test/fixtures/common, and drop the Bazel runfiles lookup.
- Point package metadata at this repository, version it on its own
  from 0.1.0, and ship LICENSE and NOTICE in the package.
- Add CONTRIBUTING.md, which defers to the Selenium guide.
@AutomatedTester AutomatedTester self-assigned this Nov 9, 2026
@AutomatedTester
AutomatedTester merged commit 569ae13 into trunk Nov 9, 2026
3 checks passed
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.

2 participants