Skip to content

Use hosted locator test page for Finders examples - #2800

Merged
diemol merged 1 commit into
trunkfrom
finders-hosted-locators-page
Sep 3, 2026
Merged

Use hosted locator test page for Finders examples#2800
diemol merged 1 commit into
trunkfrom
finders-hosted-locators-page

Conversation

@diemol

@diemol diemol commented Sep 3, 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

Replaces the Finders doc's illustrative, non-executable inline HTML fixture with Selenium's
hosted locator test page,
and moves every language's example (Java, Python, C#, Ruby, JavaScript, Kotlin) into the
examples/ directory as real, assertion-bearing, CI-runnable tests referenced via
gh-codeblock, matching the site's documented "Creating/Moving Examples" workflow. Updates the
ja/pt-br/zh-cn translations to match.

Credit to @Kasturi2004 for the original idea and attempt at this in #2776 (replacing the
inline HTML snippet with the hosted locator page). This PR builds on that starting point: it
fixes a bug the original introduced (the "Find Elements From Element" section printed
getText()/.text on <input> elements, which is always empty — now reads the value
attribute), and completes the migration for the languages that were left as inline,
untested snippets (Java, C#, JavaScript, Kotlin), which #2776 did not get to.

Motivation and Context

The prior HTML snippet couldn't be executed, so the example tests for it were marked
skip/illustrative-only. Using the hosted test page makes every language's Finder examples
concrete, runnable, and verified in CI, consistent with the rest of the site's example
conventions.

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • 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.

Test plan

  • mvn test -Dtest=FindersTest in examples/java and examples/kotlin: 7/7 passing.
  • dotnet test --filter FullyQualifiedName~FindersTest in examples/dotnet/SeleniumDocs: 7/7 passing.
  • pytest tests/elements/test_finders.py in examples/python: 8/8 passing.
  • bundle exec rspec spec/elements/finders_spec.rb + bundle exec rubocop in examples/ruby: 7/7 passing, no lint offenses.
  • npx mocha test/elements/finders.spec.js in examples/javascript: 7/7 passing.
  • ./build-site.sh: builds clean for all four locales (en, ja, pt-br, zh-cn).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FfNGQbess9DUXE21PrFEzc

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@CLAassistant

CLAassistant commented Sep 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for selenium-dev ready!

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

Replaces the Finders doc's illustrative, non-executable inline HTML fixture
with Selenium's hosted locator test page, and moves every language's example
(Java, Python, C#, Ruby, JavaScript, Kotlin) into examples/ as real,
assertion-bearing, CI-runnable tests referenced via gh-codeblock, matching
the site's documented "Creating/Moving Examples" workflow. Updates the
ja/pt-br/zh-cn translations to match.

Credit to Kasturi2004 for the original idea and attempt at this in #2776
(replacing the inline HTML snippet with the hosted locator page). This
builds on that starting point: it fixes a bug the original introduced (the
"Find Elements From Element" section printed getText()/.text on <input>
elements, which is always empty — now reads the value attribute instead),
and completes the migration for the languages #2776 left as inline,
untested snippets (Java, C#, JavaScript, Kotlin).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FfNGQbess9DUXE21PrFEzc
@diemol
diemol force-pushed the finders-hosted-locators-page branch from 926ba29 to 0c395b2 Compare September 3, 2026 16:15
@diemol
diemol merged commit 1125407 into trunk Sep 3, 2026
27 of 29 checks passed
@diemol
diemol deleted the finders-hosted-locators-page branch September 3, 2026 16:18
@diemol diemol mentioned this pull request Sep 3, 2026
6 tasks
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