Skip to content

fix: update Python test command documentation links#2701

Open
noritaka1166 wants to merge 1 commit into
SeleniumHQ:trunkfrom
noritaka1166:fix/python-test-command-doc-link
Open

fix: update Python test command documentation links#2701
noritaka1166 wants to merge 1 commit into
SeleniumHQ:trunkfrom
noritaka1166:fix/python-test-command-doc-link

Conversation

@noritaka1166

Copy link
Copy Markdown
Contributor

Description

Updated the Python gh-codeblock reference in the “Executing” section of the WebDriver getting started documentation.

The reference now points to pytest on line 44 of examples/python/README.md in the English, Japanese, Portuguese, and Simplified Chinese pages.

Motivation and Context

The previous reference pointed to line 35, which is part of the dependency installation command rather than the command for running the test suite.

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 Jul 14, 2026

Copy link
Copy Markdown

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 91bff4b

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Fix Python test command codeblock links in WebDriver getting started docs

📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Fix Python "Executing" snippet to show the pytest command, not dependency installation.
• Update gh-codeblock line anchors across EN/JA/PT-BR/ZH-CN getting-started pages.
Diagram

graph TD
  A["Getting started docs (EN/JA/PT-BR/ZH-CN)"] --> B["gh-codeblock shortcode"] --> C["examples/python/README.md#L44"] --> D["Rendered: pytest command"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Inline the pytest command directly in the docs
  • ➕ Eliminates fragile line-number anchors
  • ➕ Makes the rendered docs independent of README formatting changes
  • ➖ Duplicates content across languages
  • ➖ Can drift from the example README over time
2. Use stable snippet markers instead of line numbers (if supported/added)
  • ➕ Keeps single source of truth while avoiding line-renumber breakage
  • ➕ Scales better as README evolves
  • ➖ May require updating/adding shortcode capability or adopting a snippet convention
  • ➖ More work than warranted for this small fix

Recommendation: For this PR, the current approach (updating the gh-codeblock line reference to the correct command) is appropriate and minimal. Longer-term, consider moving away from line-number anchors for single-line commands (either inline in docs or via stable snippet markers) to reduce future breakage when README content shifts.

Files changed (4) +4 / -4

Documentation (4) +4 / -4
using_selenium.en.mdPoint Python Executing snippet to pytest command line +1/-1

Point Python Executing snippet to pytest command line

• Updates the Python gh-codeblock reference in the Executing section from README line 35 to line 44 so the rendered snippet shows the pytest command rather than dependency installation.

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md

using_selenium.ja.mdFix Python Executing codeblock line anchor (JA) +1/-1

Fix Python Executing codeblock line anchor (JA)

• Adjusts the embedded Python README snippet to reference line 44, aligning the Japanese page with the correct pytest execution command.

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md

using_selenium.pt-br.mdFix Python Executing codeblock line anchor (PT-BR) +1/-1

Fix Python Executing codeblock line anchor (PT-BR)

• Updates the Python codeblock include to pull from README line 44 so it displays the pytest command in the Portuguese (Brazil) page.

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.pt-br.md

using_selenium.zh-cn.mdFix Python Executing codeblock line anchor (ZH-CN) +1/-1

Fix Python Executing codeblock line anchor (ZH-CN)

• Changes the Python gh-codeblock reference to README line 44, ensuring the Simplified Chinese page shows the test execution command.

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.zh-cn.md

@qodo-code-review

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

Qodo Logo

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