Use hosted locator test page for Finders examples - #2800
Merged
Conversation
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
✅ Deploy Preview for selenium-dev ready!
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
force-pushed
the
finders-hosted-locators-page
branch
from
September 3, 2026 16:15
926ba29 to
0c395b2
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viagh-codeblock, matching the site's documented "Creating/Moving Examples" workflow. Updates theja/pt-br/zh-cn translations to match.
Credit to
@Kasturi2004for the original idea and attempt at this in #2776 (replacing theinline 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()/.texton<input>elements, which is always empty — now reads thevalueattribute), 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
Checklist
Test plan
mvn test -Dtest=FindersTestinexamples/javaandexamples/kotlin: 7/7 passing.dotnet test --filter FullyQualifiedName~FindersTestinexamples/dotnet/SeleniumDocs: 7/7 passing.pytest tests/elements/test_finders.pyinexamples/python: 8/8 passing.bundle exec rspec spec/elements/finders_spec.rb+bundle exec rubocopinexamples/ruby: 7/7 passing, no lint offenses.npx mocha test/elements/finders.spec.jsinexamples/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