Skip to content

docs: Link assertion example in using_selenium.en.md#2161

Merged
diemol merged 3 commits into
SeleniumHQ:trunkfrom
beinghumantester:my-fix-branch
Jul 20, 2026
Merged

docs: Link assertion example in using_selenium.en.md#2161
diemol merged 3 commits into
SeleniumHQ:trunkfrom
beinghumantester:my-fix-branch

Conversation

@beinghumantester

@beinghumantester beinghumantester commented Feb 8, 2025

Copy link
Copy Markdown
Contributor

User description

Added a reference to the existing assertion code (assertEquals("Web form", title)) in usingselenium.en.md to improve documentation clarity.

Description

  • Linked the assertion line in the Kotlin example section.
  • Ensured consistency in the documentation.

Motivation and Context

  • Improves visibility of assertion usage in Selenium’s Kotlin examples.
  • Enhances documentation clarity and consistency.

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.

@netlify

netlify Bot commented Feb 8, 2025

Copy link
Copy Markdown

Deploy Preview for selenium-dev canceled.

Name Link
🔨 Latest commit 32df7af
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/67a71e522e29b8000802571d

@CLAassistant

CLAassistant commented Feb 8, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@beinghumantester beinghumantester left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This pull request adds a link assertion example to the Selenium documentation. I have updated the code block reference in the Kotlin section. Please review and let me know if any changes are needed. Looking forward to your feedback. Thank you!

@harsha509 harsha509 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

HI @automatealchemist ,

Thank you for the PR. Could you please do the similar changes in other translated pages too which are other than in english!

@beinghumantester

Copy link
Copy Markdown
Contributor Author

Could you please do the similar changes in other translated pages too which are other than in english!

Sure.

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for selenium-dev ready!

Name Link
🔨 Latest commit 97f3274
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/6a5e1b032d9080000891cae0
😎 Deploy Preview https://deploy-preview-2161--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 Jul 20, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 10 rules

Grey Divider


Remediation recommended

1. Malformed Kotlin gh-codeblock path ✓ Resolved 📘 Rule violation ✧ Quality
Description
The Kotlin gh-codeblock shortcode path in using_selenium.en.md is malformed: it drops the
required leading / and uses an inconsistent line-range fragment (#L20-21) compared to the style
guide’s documented #Lx-Ly format, which can break the generated GitHub API URL and prevent the
snippet/link from rendering correctly.
Code

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md[161]

+{{< gh-codeblock path="examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt#L20-21" >}}
Evidence
The style guide’s documented gh-codeblock examples use path values like /examples/...#L31-L32,
showing both a leading / and the #Lx-Ly format with L on both ends of the range. In the
English “Asserting” section, the Kotlin tab uses path="examples/...#L20-21", which diverges from
that format; since the shortcode builds the GitHub Contents API URL as .../contents%s?ref=... by
directly concatenating the path, omitting the leading / yields a malformed URL like
.../contentsexamples/... (missing the separator), so the remote fetch/snippet rendering cannot
succeed, and other docs using a leading / for the same Kotlin file reinforce the expected format.

Rule 2141344: Documentation changes must follow the central style guide file
website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md[161-161]
website_and_docs/content/documentation/about/style.en.md[130-192]
website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md[158-163]
website_and_docs/layouts/shortcodes/gh-codeblock.html[22-28]
website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md[152-155]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Fix the Kotlin `gh-codeblock` shortcode `path` in `using_selenium.en.md` so it matches the documented format (leading `/` and correct `#Lx-Ly` line-range fragment), preventing malformed GitHub Contents API URLs and ensuring the Kotlin snippet/link renders correctly.

## Issue Context
The shortcode concatenates the provided `path` into a GitHub Contents API URL in the form `.../contents%s?ref=...`, which requires `path` to begin with `/` to preserve the URL separator. The central style guide documents `gh-codeblock` usage with `path` values like `/examples/...#L..-L..` (including `L` on both ends of the range), while the Kotlin assertion snippet under the **Asserting** section currently uses `examples/...#L20-21`.

## Fix Focus Areas
- website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md[158-162]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

The site-wide gh-codeblock path convention moved to leading slashes,
which is what the shortcode's GitHub Contents API call actually
requires (missing it 404s and fails the Netlify build). The Kotlin
reference added in this PR still used the old relative form; the
ja/pt-br/zh-cn translations already picked up the corrected form via
the trunk sync, since another PR fixed them independently in the
meantime.

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

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 97f3274

@diemol
diemol merged commit 473135a into SeleniumHQ:trunk Jul 20, 2026
6 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.

4 participants