Skip to content

Hugo docsy upgrade - #2771

Merged
diemol merged 3 commits into
trunkfrom
hugo-docsy-upgrade
Sep 16, 2026
Merged

diemol merged 3 commits into
trunkfrom
hugo-docsy-upgrade

Conversation

@AutomatedTester

@AutomatedTester AutomatedTester commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Description

Two commits, deliberately separate so they can be reviewed — or reverted — independently.

1. Upgrade Hugo to 0.164.0 and Docsy to 0.16.0

The site was pinned to Hugo 0.148.2 and Docsy 0.10.0, six Docsy minor releases behind. Docsy 0.16.0 requires Hugo 0.160.1 or later and is validated against 0.164.0, so both move together.

Docsy 0.16.0 breaking changes handled here:

  • The theme moved into theme/, so the module import path is now github.com/google/docsy/theme.
  • Bootstrap and Font Awesome are npm packages rather than Hugo modules. github.com/google/docsy/dependencies is dropped and hugo mod npm pack generates packages/hugoautogen/, which is committed so npm ci works in CI.
  • PostCSS is opt-in for sites with no RTL language and no PostCSS config, so autoprefixer, postcss and postcss-cli are removed.
  • Default favicon artwork was removed from the theme. Six of the ten favicon links this site emitted came from Docsy, not from this repository. The new discovery partial only looks in static/, while ours live in static/favicons/, so without an override the site emitted no icon links at all. layouts/_partials/favicons.html keeps every existing icon URL and uses Selenium's own pwa-*.png in place of the Docsy-branded androids.

Hugo changes between 0.148.2 and 0.164.0 handled here:

  • Language config and template API renames from 0.158.0: languageName → label, .Language.Lang → .Language.Name, .Language.LanguageName → .Language.Label.
  • .Site.Data → hugo.Data (deprecated in 0.156.0).
  • The gist and twitter/tweet shortcodes were removed in 0.156.0. tweet becomes the built-in x shortcode; gist is replaced by a local shortcode reproducing Hugo's removed template.
  • text/html content files are denied by default from 0.162.0, so security.allowContent explicitly allows the .html landing pages this site publishes.
  • The global imaging.quality setting was deprecated in 0.163.0. It was set to 75, already Hugo's default, so removing it changes no output.
  • .Render now fails the build on a missing view template instead of silently rendering nothing, which surfaced meetings/single.html calling the Docsy content view by its pre-0.16 name.

Stylesheet regressions found in review. Until Docsy 0.16.0 the theme kept _alerts.scss and _nav.scss directly under assets/scss/, so Hugo's union filesystem served this repository's same-named files in their place. Docsy 0.16.0 moved its stylesheets under assets/scss/td/, which left both project files orphaned — present in the repository, imported by nothing. Separately, Docsy 0.16.0 prefixed the Google Fonts variables with td- and changed $td-enable-google-fonts to default to false, so $google_font_name and friends were silently ignored.

Together those accounted for twelve CSS classes present on the live site and absent from the first build of this branch:

Lost Effect Cause
alert-static The announcement banner lost padding-top: 80px, so it rendered behind the fixed navbar and looked as though it had gone orphaned _alerts.scss
alert-blue, alert-green, alert-cyan, alert-orange, alert-purple, alert-yellow, alert-webdriver The 8px coloured left border framing sections on /support/ and similar pages orphaned _alerts.scss
navbar-bg-onscroll, and .td-navbar { background: $primary } Navbar lost its Selenium green, falling back to the Docsy default orphaned _nav.scss
googleapis Encode Sans was never requested; the site fell back to the Bootstrap system font stack renamed font variables

Fixed by importing alerts and nav from _styles_project.scss and renaming the font variables. Importing layers the project files over the theme's versions rather than replacing them, and _styles_project is imported last, so these rules still win. _nav.scss also needed $font-awesome-font-name → $td-font-awesome-font-name.

A full class-level diff of the minified stylesheet against production now shows two remaining differences, both benign: fa-sharp, a Font Awesome Pro family class this site never uses, and td-offset-anchor, whose :target offset hack Docsy 0.16.0 replaced with a global scroll-padding-top on html, body. The resolved --bs-font-sans-serif stack is byte-identical to production.

Note for maintainers, not changed here: assets/scss/_buttons.scss is imported by nothing and compiles into neither the production stylesheet nor this one, yet .selenium-button-container is used across ten templates and content files. That is pre-existing on trunk. Wiring it up would change how the site looks, so it is left alone.

Version pins updated in netlify.toml, the three workflows, README.md, .gitpod.yml and contributing.{en,ja,pt-br,zh-cn}.md.

Alias handling — the largest part of this commit. Hugo 0.155.0 (gohugoio/hugo#14388) changed alias publication for non-default languages: an alias now publishes relative to that language's site root rather than the publish root, because languages previously clobbered each other's aliases. Both alias styles used here had to move, and all 508 affected URLs still publish at their current paths:

  • 260 aliases already carrying their own language prefix would have published twice-prefixed (/ja/ja/...). The prefix is dropped from front matter and Hugo adds it.
  • 248 legacy /documentation/<lang>/... aliases predate the 2021 restructure and sit at the site root, which is the English namespace. A translated page can no longer publish there, so they move to the English counterpart.

2. Remove translated pages whose legacy URLs now resolve to English

A consequence of the above is that those 248 legacy URLs now resolve to the English page rather than the translated one. This commit removes the translated pages they no longer reach, and redirects everything:

  • 209 translated pages deleted (70 ja, 69 pt-br, 70 zh-cn), leaving roughly 54 translated documentation pages per language.
  • 426 URLs preserved as aliases on the English counterparts, covering each deleted page's own permalink and every alias it carried. Permalinks came from hugo list all rather than being derived from file paths, so slug overrides cannot silently drop a URL.
  • 97 ref shortcodes in the 51 surviving translated pages pointed at deleted pages. Hugo resolves refs within the current language, so they now pass lang="en". Only the file and line positions Hugo reported are changed, so refs between translated pages that still exist are untouched.

Motivation and Context

The version gap had become a practical problem: ./build-site.sh does not run against a current Hugo install, so contributors with a recent brew install hugo have no working local build. Every release in the 0.148 → 0.164 range also carried security hardening, and 0.164.0 fixes a template-rendering slowdown affecting 0.128.0 onwards.

It also unblocks planned work. Docsy 0.15.0 added per-page Markdown alternate outputs (theme/layouts/all.md, built on .RenderShortcodes) and a llms.txt layout. Building those by hand against Docsy 0.10.0 would have been thrown away by this upgrade, so the upgrade came first.

Reviewers: the judgement call

The second commit removes 179 pages of genuine Japanese, Portuguese and Chinese prose — the other 30 of the 209 were English text sitting in a translated filename. That is the substance of the decision and it is worth arguing about. The commit is kept separate precisely so it can be dropped or reverted without disturbing the upgrade, which stands on its own.

Verification

Both commits were verified by diffing the full built output against a Hugo 0.148.2 baseline captured before any change.

After the upgrade commit:

  • Zero non-print URLs lost. llms.txt byte-identical (19,001 bytes). Tab rendering unchanged. Canonical and hreflang links intact across all four languages.
  • 224 differences remain, all noindex meta-refresh stubs of print-format aliases, which Hugo no longer renders for unrendered pages.

After the removal commit:

  • Every URL still resolves except /ja/documentation/webdriver/ja/documentation/webdriver/browser/, a doubled path produced by an alias missing its leading slash. The URL it was meant to create, /ja/documentation/webdriver/browser/, did not exist before this change either.
  • The other 48 differences are noindex print-format copies of the deleted pages.
  • Redirects spot-checked: /ja/documentation/webdriver/waits/ and /documentation/ja/webdriver/waits/ both resolve to the English waits page.

Also verified that npm install is now genuinely required — with node_modules absent the build fails with File to import not found or unreadable: ../../vendor/bootstrap/scss/functions. README.md gains that step and an explanation.

Rebased onto current trunk

This branch was rebased onto a47553c and force-pushed, replacing the earlier Merge branch 'trunk' commit so the two commits stay separately reviewable. Everything trunk gained in the meantime is included, including #2769 and the JSON-LD structured data from #2759.

Three resolutions were needed:

  • package.json / package-lock.json: trunk bumped postcss, postcss-cli, autoprefixer and browserslist via Renovate. This upgrade removes those dependencies, so the removal wins and the Renovate bumps are moot.
  • The JSON-LD block added to layouts/partials/hooks/head-end.html by #2759 sets inLanguage from .Language.Lang, which Hugo 0.158.0 renamed. It now uses .Language.Name, matching the hreflang code directly above it. Verified rendering as "inLanguage":"ja" on translated pages.
  • Nine translated pages the second commit deletes were modified on trunk by #2792, #2800 and #2793. Each of those changes is mechanical and already mirrored in the English page that survives, so the deletion stands.

Re-verified against a fresh Hugo 0.148.2 build of a47553c:

  • One non-print URL lost, the same /ja/documentation/webdriver/ja/documentation/webdriver/browser/ doubled path described above. The other 272 are noindex print-format alias stubs; all 272 were checked.
  • llms.txt byte-identical to the baseline.
  • 206 pages lose their JSON-LD block, and all 206 are pages the second commit turns into redirect stubs. No surviving page lost one.
  • hreflang still complete on pages that are still translated: 1,166 alternate links across the site.

Resolved risk

GO_VERSION in netlify.toml moves from 1.20.1 to 1.25.5, which I could not confirm locally. The deploy preview for this PR now builds and serves, so Netlify's image does provide it.

Types of changes

  • Change to the site
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

Note on the first checkbox: the site does change, and I verified it by diffing the complete rendered output against a pre-upgrade baseline rather than by eye. The Netlify deploy preview has since been checked: /documentation/webdriver/bidi/ renders, and both /ja/documentation/webdriver/waits/ and /documentation/ja/webdriver/waits/ redirect to the English page.

@netlify

netlify Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for selenium-dev ready!

Name Link
🔨 Latest commit 3fba2aa
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/6aaab201823e1a000879728a
😎 Deploy Preview https://deploy-preview-2771--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.

@diemol diemol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@AutomatedTester the font looks different. Is that intentional?

The repo was pinned to Hugo 0.148.2 and Docsy 0.10.0, six Docsy minor
releases behind. Docsy 0.16.0 requires Hugo 0.160.1 or later and is
validated against 0.164.0, so both move together.

Docsy 0.16.0 breaking changes:

- The theme moved into theme/, so the module import path becomes
  github.com/google/docsy/theme.
- Bootstrap and Font Awesome are npm dependencies rather than Hugo
  modules, so github.com/google/docsy/dependencies is dropped and
  `hugo mod npm pack` generates packages/hugoautogen/. Re-run it, then
  `npm install`, whenever Docsy is updated.
- PostCSS is opt-in for sites with no RTL language and no PostCSS config
  of their own, so autoprefixer, postcss, and postcss-cli are removed.
- Docsy no longer ships default favicon artwork. Six of the ten icons the
  site linked came from Docsy, not this repository; the new default
  partial only discovers icons in static/, while ours live in
  static/favicons/. layouts/_partials/favicons.html keeps every existing
  icon URL and uses Selenium's own pwa-*.png in place of Docsy's.

Hugo changes between 0.148.2 and 0.164.0:

- Language config and template APIs were renamed in 0.158.0:
  languageName -> label, .Language.Lang -> .Language.Name,
  .Language.LanguageName -> .Language.Label.
- .Site.Data was deprecated in 0.156.0 in favour of hugo.Data.
- The gist and twitter/tweet shortcodes were removed in 0.156.0. tweet is
  replaced by the built-in x shortcode; gist is replaced by a local
  shortcode reproducing Hugo's removed template.
- text/html content files are denied by default from 0.162.0, so
  security.allowContent explicitly allows the .html landing pages this
  site publishes.
- The global imaging.quality setting was deprecated in 0.163.0. It was
  set to 75, already Hugo's default, so removing it changes no output.
- .Render now fails the build on a missing view template instead of
  rendering nothing, which surfaced meetings/single.html calling the
  Docsy content view by its pre-0.16 name.

Alias handling (Hugo 0.155.0, gohugoio/hugo#14388):

Aliases on a page in a non-default language are now published relative to
that language's site root rather than the publish root, because languages
previously clobbered each other's aliases. Both alias styles in this repo
had to move, and all 508 affected URLs still publish at their current
paths:

- 260 aliases already carrying their own language prefix would have been
  published twice-prefixed (/ja/ja/...). The prefix is now dropped from
  front matter and Hugo adds it.
- 248 legacy /documentation/<lang>/... aliases predate the 2021
  restructure and sit at the site root, which is the English namespace.
  A translated page can no longer publish there, so they move to the
  English counterpart. The URLs keep working; they now resolve to the
  English page rather than the translated one.

Verified against a 0.148.2 baseline build: llms.txt is byte-identical,
tab rendering is unchanged, canonical and hreflang links are intact, and
no non-print URL is lost. The 224 remaining differences are noindex
meta-refresh stubs of print-format aliases, which Hugo no longer renders
for unrendered pages.
The previous commit moved 248 legacy /documentation/<lang>/... aliases
onto their English counterparts, because Hugo 0.155.0 no longer lets a
translated page publish an alias at the site root. Those URLs kept
working but started resolving to the English page rather than the
translated one.

Rather than keep translated pages that the legacy URLs no longer reach,
this removes them and redirects every URL they published:

- 209 translated pages deleted (70 ja, 69 pt-br, 70 zh-cn), leaving
  roughly 54 translated documentation pages per language.
- 426 URLs preserved as aliases on the English counterparts, covering
  each deleted page's own permalink and every alias it carried, so
  nothing 404s. Permalinks were taken from `hugo list all` rather than
  derived from file paths.
- 97 `ref` shortcodes in the 51 surviving translated pages pointed at
  deleted pages. Hugo resolves refs within the current language, so they
  now pass lang="en" and resolve against the English page, matching where
  those URLs redirect. Only the file and line positions Hugo reported are
  changed, so refs to translated pages that still exist are untouched.

Verified by diffing the built output against the pre-deletion build:
every URL still resolves except
/ja/documentation/webdriver/ja/documentation/webdriver/browser/, a
doubled path produced by an alias that was missing its leading slash. The
URL it was meant to create, /ja/documentation/webdriver/browser/, did not
exist before this change either. The other 48 differences are noindex
print-format copies of the deleted pages.
# Conflicts:
#	website_and_docs/package-lock.json
@diemol
diemol merged commit 782404f into trunk Sep 16, 2026
5 checks passed
@diemol
diemol deleted the hugo-docsy-upgrade branch September 16, 2026 15:19
selenium-ci added a commit that referenced this pull request Sep 16, 2026
* Upgrade Hugo to 0.164.0 and Docsy to 0.16.0

The repo was pinned to Hugo 0.148.2 and Docsy 0.10.0, six Docsy minor
releases behind. Docsy 0.16.0 requires Hugo 0.160.1 or later and is
validated against 0.164.0, so both move together.

Docsy 0.16.0 breaking changes:

- The theme moved into theme/, so the module import path becomes
  github.com/google/docsy/theme.
- Bootstrap and Font Awesome are npm dependencies rather than Hugo
  modules, so github.com/google/docsy/dependencies is dropped and
  `hugo mod npm pack` generates packages/hugoautogen/. Re-run it, then
  `npm install`, whenever Docsy is updated.
- PostCSS is opt-in for sites with no RTL language and no PostCSS config
  of their own, so autoprefixer, postcss, and postcss-cli are removed.
- Docsy no longer ships default favicon artwork. Six of the ten icons the
  site linked came from Docsy, not this repository; the new default
  partial only discovers icons in static/, while ours live in
  static/favicons/. layouts/_partials/favicons.html keeps every existing
  icon URL and uses Selenium's own pwa-*.png in place of Docsy's.

Hugo changes between 0.148.2 and 0.164.0:

- Language config and template APIs were renamed in 0.158.0:
  languageName -> label, .Language.Lang -> .Language.Name,
  .Language.LanguageName -> .Language.Label.
- .Site.Data was deprecated in 0.156.0 in favour of hugo.Data.
- The gist and twitter/tweet shortcodes were removed in 0.156.0. tweet is
  replaced by the built-in x shortcode; gist is replaced by a local
  shortcode reproducing Hugo's removed template.
- text/html content files are denied by default from 0.162.0, so
  security.allowContent explicitly allows the .html landing pages this
  site publishes.
- The global imaging.quality setting was deprecated in 0.163.0. It was
  set to 75, already Hugo's default, so removing it changes no output.
- .Render now fails the build on a missing view template instead of
  rendering nothing, which surfaced meetings/single.html calling the
  Docsy content view by its pre-0.16 name.

Alias handling (Hugo 0.155.0, gohugoio/hugo#14388):

Aliases on a page in a non-default language are now published relative to
that language's site root rather than the publish root, because languages
previously clobbered each other's aliases. Both alias styles in this repo
had to move, and all 508 affected URLs still publish at their current
paths:

- 260 aliases already carrying their own language prefix would have been
  published twice-prefixed (/ja/ja/...). The prefix is now dropped from
  front matter and Hugo adds it.
- 248 legacy /documentation/<lang>/... aliases predate the 2021
  restructure and sit at the site root, which is the English namespace.
  A translated page can no longer publish there, so they move to the
  English counterpart. The URLs keep working; they now resolve to the
  English page rather than the translated one.

Verified against a 0.148.2 baseline build: llms.txt is byte-identical,
tab rendering is unchanged, canonical and hreflang links are intact, and
no non-print URL is lost. The 224 remaining differences are noindex
meta-refresh stubs of print-format aliases, which Hugo no longer renders
for unrendered pages.

* Remove translated pages whose legacy URLs now resolve to English

The previous commit moved 248 legacy /documentation/<lang>/... aliases
onto their English counterparts, because Hugo 0.155.0 no longer lets a
translated page publish an alias at the site root. Those URLs kept
working but started resolving to the English page rather than the
translated one.

Rather than keep translated pages that the legacy URLs no longer reach,
this removes them and redirects every URL they published:

- 209 translated pages deleted (70 ja, 69 pt-br, 70 zh-cn), leaving
  roughly 54 translated documentation pages per language.
- 426 URLs preserved as aliases on the English counterparts, covering
  each deleted page's own permalink and every alias it carried, so
  nothing 404s. Permalinks were taken from `hugo list all` rather than
  derived from file paths.
- 97 `ref` shortcodes in the 51 surviving translated pages pointed at
  deleted pages. Hugo resolves refs within the current language, so they
  now pass lang="en" and resolve against the English page, matching where
  those URLs redirect. Only the file and line positions Hugo reported are
  changed, so refs to translated pages that still exist are untouched.

Verified by diffing the built output against the pre-deletion build:
every URL still resolves except
/ja/documentation/webdriver/ja/documentation/webdriver/browser/, a
doubled path produced by an alias that was missing its leading slash. The
URL it was meant to create, /ja/documentation/webdriver/browser/, did not
exist before this change either. The other 48 differences are noindex
print-format copies of the deleted pages.

---------

[deploy site] 782404f
diemol added a commit that referenced this pull request Sep 17, 2026
…2831)

* Restore translated documentation pages removed by the Docsy upgrade

Commit 782404f (Hugo docsy upgrade, #2771) deleted 209 translated
pages (70 ja, 69 pt-br, 70 zh-cn) as a side effect of a Hugo 0.155+
behavior change: aliases on a non-default-language page now publish
relative to that language's own site root, not the global publish
root (gohugoio/hugo#14388). These pages carried legacy
/documentation/<lang>/... aliases predating the 2021 site
restructure, which a translated page can no longer own. Rather than
fix the aliases, that commit deleted the pages outright and moved
their alias URLs onto the corresponding English page instead.

The translations themselves were not stale or unwanted, so this
restores their pre-deletion content from 782404f^ and fixes the
front matter so the pages build under current Hugo/Docsy:

- Legacy /documentation/<lang>/... aliases are dropped from the
  translated page (Hugo 0.155+ rejects them there); the corresponding
  English page already carries them as redirects to English content,
  per 782404f's decision, and is left untouched.
- Aliases already prefixed with the page's own language
  (/<lang>/documentation/...) have that prefix stripped, since
  Hugo now auto-prepends the page's language to each alias.
- Where dropping all aliases left an empty `aliases: []`, the key is
  removed entirely to match sibling front matter conventions.

No English (.en.md) content or examples/ files were changed.

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

* Point cross-language refs back at restored translated pages

The Hugo docsy upgrade commit (782404f) rewrote {{< ref >}}
shortcodes in surviving translated pages to force lang="en" wherever
the target page was one of the 209 translated pages it deleted, so
readers wouldn't hit a broken link.

Now that those 209 pages are restored, revert the lang="en" override
on every occurrence whose target resolves to an existing page in the
referring page's own language, so cross-links between translated
pages point at translations again instead of forcing English. All 97
occurrences across 51 files resolved with high confidence (same
directory, relative path, absolute /documentation/... path, or a
unique sitewide filename match) and were reverted; a clean `hugo
--minify` build with zero warnings confirms every reverted ref still
resolves. The 3 remaining lang="en" occurrences in
legacy/selenium_ide/html_runner.*.md are unrelated HTML markup
(xml:lang="en" lang="en" in an example runner file), not ref
shortcodes, and were left untouched.

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

* Add JS RemoteWebDriver examples to translated pages, fix Qodo findings

JS examples (added to remote_webdriver.ja/pt-br/zh-cn.md, mirroring the
gh-codeblock references already used in the English page for #2562/#2829):
Basic Example, Uploads (with translated/matching Local File Detector
note), Downloads (enable/list/download/delete), and Browser specific
functionalities (with translated/matching note on JS returning the
concrete driver class directly).

Qodo findings resolved (all pre-existing content restored verbatim from
before the Docsy-upgrade deletion, not introduced by the restoration):
- Kotlin gh-codeblock paths in waits.*.md missing a leading slash (9x)
- Indentation on restored gh-codeblock lines in finders.*.md/cookies.*.md
- Observability TOC anchors (ja: 1, pt-br: 4) not matching their headings
- waits.ja.md/zh-cn.md #is-displayed anchor -> localized heading anchor
- driver_location.ja.md #driver-location -> localized service.ja.md anchor
- GitHub line-range fragments missing the trailing L (#L73-74 -> #L73-L74)
  across options.*.md and bidi/logging.*.md
- BrowingContext() typo -> BrowsingContext() in print_page.*.md
- getting_started.pt-br.md #remote-webdriver -> #driver-remoto
- getting_started.pt-br.md/zh-cn.md PATH fragments -> localized
  driver_location.md heading anchor; zh-cn RemoteWebDriver link ->
  removed nonexistent #远程驱动 fragment
- getting_started.ja.md #event-bus -> localized components.ja.md anchor
- endpoints.pt-br.md #grid-status/#drain-node -> localized anchors,
  matching the English source's #grid-status/#drain-node targets

Each anchor fix was verified against the actual target heading text,
not just Qodo's suggestion. Shortcode balance (tabpane/tab open-close)
verified across all 28 touched files.

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

* Fix remaining Qodo findings: convert unsynced code examples to gh-codeblock

Resolves the 6 structural "rule violation" findings (Qodo items 1-6):
translated pages restored plain fenced code for topics that had never
been wired up to the tracked examples/ source, so fixes to those
snippets couldn't propagate. Added real, verified example source and
replaced the fenced blocks with gh-codeblock references in
ja/pt-br/zh-cn:

- Fluent API / GoogleSearchPage and Domain Specific Language / AccountPage
  (test_practices/encouraged/*): illustrative pattern demos referencing
  fictional types, following the existing @test @disabled("Illustrative
  only: ...") precedent already used in design_strategies/BestPractices.java
  for the same kind of non-live-testable page-object example. The DSL
  page's original PageFactory.newInstance(Class) call also no longer
  compiles against 4.49.0 (removed API) - updated to
  PageFactory.initElements(driver, Class). Left the loginTest() snippet
  using `do.something()` as prose (not real code - `do` is a reserved word).
- Fresh browser per test (zh-cn only): trivial `new FirefoxDriver()`.
- Grid getting_started metadata example: real RemoteWebDriver session
  with se:name/se:sampleMetadata capabilities. Dropped the
  browserVersion/platformName capabilities from the old snippet (Windows
  on a Mac host, arbitrary version) since they made session creation
  against the real local standalone Grid hang indefinitely waiting for a
  non-existent matching node - the metadata capabilities are what the
  section is actually about.
- Proxy examples (Java/CSharp/JavaScript/Kotlin - Python/Ruby already had
  real gh-codeblock-backed versions): rewrote as capability-verification
  tests instead of live browser launches, after discovering that setting
  a WebDriver-level Proxy capability makes Selenium Manager route its own
  browser/driver discovery network calls through that (fake) proxy,
  which always fails/hangs without a real proxy server - a genuine,
  by-design Selenium Manager behavior, not something fixable via a
  different placeholder value. Also swapped the non-parseable
  `<HOST:PORT>` placeholder for `myproxy.com:8080`, matching the
  already-working Python/Ruby examples' convention.
- Removed the now-stale {{< badge-examples >}} flag from the options.md
  proxy tabpane now that all 6 bindings are real.

Verified: mvn test (Java: ThreadGuardTest, FreshBrowserPerTestTest,
GettingStartedTest, OptionsTest - all passing), dotnet test
(OptionsTest.SetsProxy - passing), mvn test (Kotlin OptionsTest -
passing), npx mocha test/drivers/*.spec.js (JS, 8/8 passing). Full
test-compile clean across Java/Kotlin, dotnet build clean.

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

* Remove outer CI retry wrapper for Java example tests

The Maven/Gradle test steps in java-examples.yml were wrapped in
nick-invision/retry (max_attempts: 3), stacked on top of Surefire's
own rerunFailingTestsCount: 3 in pom.xml. A genuinely failing test
was retried up to 3 x 4 = 12 times, burning ~30 minutes of CI time
before failing anyway. Drop the outer wrapper and rely on Surefire's
native rerun for flaky-test recovery.

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

* Fix stale stack-frame-count assertion in LogTest

testRetrieveStacktraceForALog has failed deterministically in CI
since 2026-09-09 (filed as #2833): Chrome no longer reports a
separate stack frame for the inline onclick attribute handler, so
the bar() -> foo() throw chain on logEntryAdded.html now yields 3
call frames instead of 4. Reproduced locally against current stable
Chrome; update the expectation to match.

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

* Give ConsoleLogs test more time for CDP events to arrive

LoggingTest.ConsoleLogs timed out on Windows/nightly-Chrome CI
waiting for two console-log events to round-trip over CDP within
5 seconds. Bump the wait to 10 seconds to cover that margin on
slower CI runners.

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

* Bump Gradle's default Selenium version to match pom.xml (4.49.0)

pom.xml was bumped to selenium.version 4.49.0 in #2813, but
build.gradle's default System.getProperty fallback was left at
4.47.0. The two builds had diverged silently because the Maven step
runs first and was already failing on the unrelated LogTest issue
(previous commit), so the Gradle step's own compile failure -
CdpApiTest.java/NetworkTest.java import org.openqa.selenium.devtools
.v153, which doesn't exist in 4.47.0 - never got a chance to run.
Align the default with pom.xml so both build tools compile against
the same Selenium version.

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

---------

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.

2 participants