Skip to content

Conversation

@Cookiecodess
Copy link

@Cookiecodess Cookiecodess commented Dec 14, 2025

User description

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

In https://www.selenium.dev/documentation/webdriver/getting_started/first_script/, the Python tab for the "Running Selenium File" section shows only three backticks:

```

because the {{< gh-codeblock >}} for {{< tab header="Python" >}} is pointing to the wrong line in /examples/python/README.md. Someone probably modified the README.md, without also updating the gh-codeblock path here.

(Perhaps we should think of a more foolproof way of linking to specific parts of a file?)

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.

PR Type

Bug fix


Description

  • Fixed incorrect line reference in Python code block

  • Updated gh-codeblock path from L35 to L58 in examples/python/README.md

  • Resolves empty Python tab display in first_script documentation


Diagram Walkthrough

flowchart LR
  A["gh-codeblock<br/>L35 incorrect"] -- "update line number" --> B["gh-codeblock<br/>L58 correct"]
  B --> C["Python tab<br/>displays properly"]
Loading

File Walkthrough

Relevant files
Bug fix
first_script.en.md
Correct Python code block line reference                                 

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

  • Updated gh-codeblock path reference for Python tab from line 35 to
    line 58
  • Fixes empty code block display in "Running Selenium File" section
  • Aligns with current structure of examples/python/README.md
+1/-1     

In https://www.selenium.dev/documentation/webdriver/getting_started/first_script/, the Python tab for the "Running Selenium File" section shows only:

```
\`\`\`
```

because the `{{< gh-codeblock >}}` for `{{< tab header="Python" >}}` is pointing to the wrong line in /examples/python/README.md. Someone probably modified the README.md, without also updating the `gh-codeblock` path here.
@netlify
Copy link

netlify bot commented Dec 14, 2025

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 70568f6

@CLAassistant
Copy link

CLAassistant commented Dec 14, 2025

CLA assistant check
All committers have signed the CLA.

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
Non-applicable Scope: The change only updates a documentation shortcode line reference and does not introduce or
modify any system actions or logging, so audit trail compliance cannot be evaluated from
this diff.

Referred Code
{{< gh-codeblock path="/examples/python/README.md#L58" >}}
{{< /tab >}}

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Non-applicable Scope: The PR only adjusts a documentation codeblock reference and does not add executable logic
where error handling could be assessed.

Referred Code
{{< gh-codeblock path="/examples/python/README.md#L58" >}}
{{< /tab >}}

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status:
Non-applicable Scope: No user-facing or internal error handling is introduced in this documentation-only change,
so secure error handling cannot be evaluated.

Referred Code
{{< gh-codeblock path="/examples/python/README.md#L58" >}}
{{< /tab >}}

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Non-applicable Scope: This change only updates a Hugo shortcode path in documentation and introduces no input
handling or data processing to assess security validation.

Referred Code
{{< gh-codeblock path="/examples/python/README.md#L58" >}}
{{< /tab >}}

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Use named regions for code blocks

To improve maintainability, replace the hardcoded line number in the
gh-codeblock shortcode with a named region reference. This would prevent the
link from breaking if the target file /examples/python/README.md is modified.

website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md [236]

-{{< gh-codeblock path="/examples/python/README.md#L58" >}}
+{{< gh-codeblock path="/examples/python/README.md" region="run-python-example" >}}
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that hardcoded line numbers are fragile and proposes a more robust, maintainable solution using named regions, addressing the root cause of the issue fixed in the PR.

Medium
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants