fix: gh-codeblock pointing to an incorrect line
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
- [x] 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
- [x] I have read the contributing document.
- [x] 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"]
File Walkthrough
| Relevant files | |||
|---|---|---|---|
| Bug fix |
|
Deploy request for selenium-dev pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 70568f69f3e0410a24f60652643ce6a62d3e75d8 |
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
| Security Compliance | |
| 🟢 | No security concerns identifiedNo security vulnerabilities detected by AI analysis. Human verification advised for critical code. |
| Ticket Compliance | |
| ⚪ | 🎫 No ticket provided
|
| Codebase Duplication Compliance | |
| ⚪ | Codebase context is not definedFollow the guide to enable codebase context checks. |
| Custom Compliance | |
| 🟢 |
Generic: Meaningful Naming and Self-Documenting CodeObjective: Ensure all identifiers clearly express their purpose and intent, making code Status: Passed
|
Generic: Secure Logging PracticesObjective: To ensure logs are useful for debugging and auditing without exposing sensitive Status: Passed
| |
| ⚪ | Generic: Comprehensive Audit TrailsObjective: To create a detailed and reliable record of critical system actions for security analysis Status: Referred Code
|
Generic: Robust Error Handling and Edge Case ManagementObjective: Ensure comprehensive error handling that provides meaningful context and graceful Status: Referred Code
| |
Generic: Secure Error HandlingObjective: To prevent the leakage of sensitive system information through error messages while Status: Referred Code
| |
Generic: Security-First Input Validation and Data HandlingObjective: Ensure all data inputs are validated, sanitized, and handled securely to prevent Status: Referred Code
| |
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
PR Code Suggestions ✨
Explore these optional code suggestions:
| Category | Suggestion | Impact |
| General |
Use named regions for code blocksTo improve maintainability, replace the hardcoded line number in the website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md [236]
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 |
| ||