Skip to content

Bump Selenium to 4.49.0 across example bindings - #2830

Merged
diemol merged 3 commits into
trunkfrom
bump-grid-jar-4.49
Sep 17, 2026
Merged

diemol merged 3 commits into
trunkfrom
bump-grid-jar-4.49

Conversation

@diemol

@diemol diemol commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.

Description

Bumps Selenium to 4.49.0 across the example test suites:

  1. Bundled Grid server jar: selenium-server-4.46.0.jar -> selenium-server-4.49.0.jar (new binary downloaded from the official selenium-4.49.0 GitHub release), following the same pattern as the previous bump (0451a8cd7ed, "Bumping to Grid 4.46"). Updated the hardcoded filename in:

    • examples/dotnet/SeleniumDocs/BaseTest.cs
    • examples/python/tests/conftest.py (3 occurrences)
    • examples/ruby/spec/drivers/remote_webdriver_spec.rb

    examples/javascript/test/drivers/gridServer.js was not touched — it doesn't exist on trunk yet (part of the not-yet-merged Add JavaScript examples for Remote WebDriver docs (#2562) #2829). Whoever merges second should update it.

  2. .NET client packages: Selenium.Support/Selenium.WebDriver were still pinned to 4.46.0 — the only binding left behind (Java, Python, Ruby, JavaScript, and Kotlin were already on 4.49.0). Bumped both to 4.49.0.

    This surfaced a real compile+runtime break in examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs: the 4.49.0 client only ships DevTools/CDP protocol domains V151-V153, not the previously hardcoded V150 (and the matching StartDriver("150") browser version request). Moved the namespace usages, generic domain lookups, and the browser version string from 150 to 153 together, keeping the existing pairing pattern intact.

Deliberately left untouched: website_and_docs/content/blog/2026/selenium-4-46-released.md — historical blog content.

Motivation and Context

Keeps every language binding's example test suite exercising a current Selenium version (both the server and each client library), and keeps Remote WebDriver/Grid examples working against a current server jar. A user directly asked whether all languages were on 4.49 after reviewing this PR's initial CI results, which surfaced the .NET client gap.

Types of changes

  • Change to the site

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works. (No doc content changed — this PR only touches example test fixtures/dependencies, so a Hugo render isn't applicable.)

Validation

  • Python: pytest tests/drivers/test_remote_webdriver.py -v -> 3 passed
  • Ruby: bundle exec rspec spec/drivers/remote_webdriver_spec.rb -> 3 examples, 0 failures
  • .NET: dotnet test --filter RemoteWebDriverTest -> 4 passed; dotnet test --filter NetworkTest -> 7 passed (previously failed to compile, then failed at runtime, before the V150->V153 fix); full suite dotnet test -> 161/164 passed, remaining 3 failures are pre-existing flakiness unrelated to this change (live-site network timeout, browser-parallelism scroll timing) — confirmed by each passing individually in isolation.
  • JavaScript: skipped, see note above

Note on CI: the tests (ubuntu/windows, nightly) jobs on this PR fail on an unrelated, pre-existing V150 compile error in the nightly .NET client matrix — confirmed already failing on trunk's scheduled nightly runs for 5+ days before this PR existed. The stable matrix jobs pass.

🤖 Generated with Claude Code

Swaps the bundled selenium-server-4.46.0.jar used by Remote WebDriver
example test fixtures for 4.49.0, and updates the hardcoded filename
references in the Python, Ruby, and .NET example suites.

Validated: pytest tests/drivers/test_remote_webdriver.py (3 passed),
bundle exec rspec spec/drivers/remote_webdriver_spec.rb (3 passed),
dotnet test --filter RemoteWebDriverTest (4 passed).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for selenium-dev ready!

Name Link
🔨 Latest commit 2274b00
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/6aab1ebf69947b0007a31124
😎 Deploy Preview https://deploy-preview-2830--selenium-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@qodo-code-review

qodo-code-review Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 2274b00 ⚖️ Balanced

Results up to commit 5f5dac3 ⚖️ Balanced


No changes from previous review

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Bump bundled Selenium server jar to 4.49.0

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Replaces bundled Selenium server 4.46.0 with 4.49.0 for Remote WebDriver examples.
• Aligns .NET, Python, and Ruby fixtures with the upgraded server artifact.
Diagram

graph TD
  Tests["Remote tests"] --> DotNet[".NET fixture"] & Python["Python fixtures"] & Ruby["Ruby fixture"] --> Jar["Server JAR"] --> Grid["Local Grid"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use a stable unversioned jar name
  • ➕ Future server upgrades would not require fixture source changes.
  • ➕ All language suites could reference one permanent path.
  • ➖ The checked-in filename would no longer expose the bundled version.
  • ➖ Artifact replacement could be less visible during review.
2. Centralize the server version
  • ➕ A shared manifest could provide one source of truth.
  • ➕ Automated setup could download and verify the expected artifact.
  • ➖ Cross-language fixture integration would require additional tooling.
  • ➖ Network-dependent setup would make examples less self-contained.

Recommendation: Keep the PR's explicit versioned filename approach for this scoped bump. It follows the existing repository pattern, preserves reproducibility, and makes the bundled version visible; centralization is only worthwhile if server bumps become frequent or more consumers are added.

Files changed (4) +5 / -5

Other (4) +5 / -5
selenium-server-4.49.0.jarBundle Selenium server 4.49.0 +0/-0

Bundle Selenium server 4.49.0

• Adds the official Selenium 4.49.0 standalone server artifact, replacing the previously bundled 4.46.0 binary used by Remote WebDriver examples.

examples/selenium-server-4.49.0.jar

BaseTest.csPoint .NET tests to Selenium server 4.49.0 +1/-1

Point .NET tests to Selenium server 4.49.0

• Updates the server jar constant used when the .NET base test launches a local Grid process.

examples/dotnet/SeleniumDocs/BaseTest.cs

conftest.pyPoint Python server fixtures to Selenium 4.49.0 +3/-3

Point Python server fixtures to Selenium 4.49.0

• Updates the jar path in the legacy server, standard server, and secured Grid pytest fixtures so each launches version 4.49.0.

examples/python/tests/conftest.py

remote_webdriver_spec.rbPoint Ruby Remote WebDriver specs to Selenium 4.49.0 +1/-1

Point Ruby Remote WebDriver specs to Selenium 4.49.0

• Updates the Selenium::Server path used by the Ruby Remote WebDriver examples to launch the upgraded bundled jar.

examples/ruby/spec/drivers/remote_webdriver_spec.rb

…ersion

Selenium.Support/Selenium.WebDriver were still pinned to 4.46.0, the only
binding left behind after the server jar bump. Bumping them to 4.49.0
surfaced a compile break in BiDi/CDP/NetworkTest.cs: the 4.49.0 client only
ships DevTools protocol domains V151-V153, not the previously pinned V150.
Moved the namespace usages, generic domain lookups, and the hardcoded
browser version requested from Selenium Manager from 150 to 153 in lock
step, matching how they were already paired.

Validated: dotnet test --filter NetworkTest -> 7/7 passed (was failing to
compile, then failing at runtime with "DevTools version is not in the
supported range" before this fix). Full suite: 161/164 passed, 3 failures
are pre-existing flakiness unrelated to this change (live-site network
timeout and browser-parallelism scroll timing), confirmed by each passing
individually in isolation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@diemol diemol changed the title Bump bundled Selenium server jar from 4.46.0 to 4.49.0 Bump Selenium to 4.49.0 across example bindings Sep 16, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 2274b00

@diemol
diemol merged commit 748bf12 into trunk Sep 17, 2026
19 of 21 checks passed
@diemol
diemol deleted the bump-grid-jar-4.49 branch September 17, 2026 06:39
diemol added a commit that referenced this pull request Sep 17, 2026
- gridServer.js still pointed at selenium-server-4.46.0.jar after the
  merge from trunk (#2830), which renamed the bundled jar to 4.49.0 and
  didn't touch this file since it didn't exist on trunk at merge time.
- Addressed a new Qodo finding surfaced by the previous readiness-check
  fix: waitForServer only advanced past its overall deadline after an
  HTTP response ended or errored, so a connection that stalled or
  aborted mid-response could hang startGrid indefinitely past the
  declared 60s timeout, with cleanup never reached. Added a per-request
  timeout (2s) that destroys the stalled request and retries, plus an
  'aborted' handler on the response.

Verified: npx mocha test/drivers/*.spec.js -> 7/7 passing against the
real selenium-server-4.49.0.jar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ko4CniqqrtSVntSMKyQrqq
diemol added a commit that referenced this pull request Sep 17, 2026
* Add JavaScript examples for Remote WebDriver docs

Every section of the Remote WebDriver doc page (Basic Example, Uploads,
Downloads, Browser specific functionalities) had no JavaScript example,
only a badge-code placeholder. Adds a remote_webdriver.spec.js covering
the same ground as the existing Java/Python/.NET/Ruby examples, plus a
gridServer.js helper that spins up a local standalone Grid the same way
Python's conftest.py server fixture does, and wires the new examples
into the docs via gh-codeblock line references.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Address Qodo review findings on Remote WebDriver JS examples

- gridServer.js: waitForServer now checks the HTTP status code and
  parses the /status JSON payload for value.ready instead of resolving
  on any response, and startGrid kills the spawned Java process if the
  readiness wait fails/times out instead of leaking it.
- remote_webdriver.spec.js: the Downloads test now waits until every
  expected file name is present (not just the last one requested)
  before asserting the file list, avoiding a flaky race; afterEach now
  stops the Grid process in a finally block so a rejected driver.quit()
  can't skip cleanup.
- Updated remote_webdriver.en.md gh-codeblock line ranges to match the
  shifted line numbers in the spec file.

Verified: npx mocha test/drivers/*.spec.js -> 7/7 passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ko4CniqqrtSVntSMKyQrqq

* Fix jar reference after 4.49.0 bump and harden grid readiness polling

- gridServer.js still pointed at selenium-server-4.46.0.jar after the
  merge from trunk (#2830), which renamed the bundled jar to 4.49.0 and
  didn't touch this file since it didn't exist on trunk at merge time.
- Addressed a new Qodo finding surfaced by the previous readiness-check
  fix: waitForServer only advanced past its overall deadline after an
  HTTP response ended or errored, so a connection that stalled or
  aborted mid-response could hang startGrid indefinitely past the
  declared 60s timeout, with cleanup never reached. Added a per-request
  timeout (2s) that destroys the stalled request and retries, plus an
  'aborted' handler on the response.

Verified: npx mocha test/drivers/*.spec.js -> 7/7 passing against the
real selenium-server-4.49.0.jar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ko4CniqqrtSVntSMKyQrqq

* Guard grid readiness polling against duplicate/unhandled retry events

Two findings from the previous readiness-check hardening:
- The response had no 'error' listener, only 'aborted'. A response
  that closes mid-stream (e.g. ECONNRESET) emits an unhandled 'error'
  event, which crashes the Node process instead of triggering a retry.
- A single stalled attempt could call retryOrFail() twice: once from
  the request's 'timeout' handler (which also destroys the request),
  and again from the resulting response 'aborted' event triggered by
  that destroy. Each call scheduled its own follow-up attempt, so a
  stalled server could multiply concurrent polling requests toward the
  deadline.

Added a per-attempt 'settled' guard (retryOnce) shared by the response
end/error/aborted handlers and the request timeout/error handlers, so
exactly one outcome (resolve or a single retry) is produced per
attempt regardless of how many of those events fire.

Verified: npx mocha test/drivers/*.spec.js -> 7/7 passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ko4CniqqrtSVntSMKyQrqq

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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