Skip to content

Added command to run python script to follow first script example#1710

Open
sadik312 wants to merge 23 commits into
SeleniumHQ:trunkfrom
sadik312:sadik-feature-branch
Open

Added command to run python script to follow first script example#1710
sadik312 wants to merge 23 commits into
SeleniumHQ:trunkfrom
sadik312:sadik-feature-branch

Conversation

@sadik312

@sadik312 sadik312 commented May 7, 2024

Copy link
Copy Markdown

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

I have added the command to run the selenium file using Python.

Motivation and Context

This was missing from the documentation.

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)
  • [ x] Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • [ x] I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

documentation, enhancement


Description

  • Added a section in examples/python/README.md to provide users with the command to run a Python script, enhancing the usability of the examples.
  • Updated website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md to link directly to the newly added instructions in the examples README, improving the documentation's interactivity and user guidance.

Changes walkthrough 📝

Relevant files
Documentation
README.md
Add Python Script Execution Instructions                                 

examples/python/README.md

  • Added instructions on how to execute a Python script using the command
    line.
  • +8/-0     
    first_script.en.md
    Link Python Script Execution in Documentation                       

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

  • Updated the Python tab to link to the new code block in the examples
    README.
  • +1/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @netlify

    netlify Bot commented May 7, 2024

    Copy link
    Copy Markdown

    Deploy Preview for selenium-dev ready!

    Name Link
    🔨 Latest commit 1bdf865
    🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/6a611d7ac3bf290008f9f77c
    😎 Deploy Preview https://deploy-preview-1710--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.

    @CLAassistant

    CLAassistant commented May 7, 2024

    Copy link
    Copy Markdown

    CLA assistant check
    All committers have signed the CLA.

    @qodo-code-review qodo-code-review Bot added documentation Improvements or additions to documentation enhancement New feature or request labels May 7, 2024
    @qodo-code-review

    Copy link
    Copy Markdown
    Contributor

    PR Description updated to latest commit (2c7aeb6)

    @qodo-code-review

    Copy link
    Copy Markdown
    Contributor

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are straightforward and limited to documentation updates. The PR involves adding a new section in a README file and updating a reference in another documentation file.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    No newline at end of file: The modified README.md file does not end with a newline. This is not typically a major issue but can lead to problems with version control systems or when concatenating files.

    🔒 Security concerns

    No

    @qodo-code-review

    qodo-code-review Bot commented May 7, 2024

    Copy link
    Copy Markdown
    Contributor

    PR Code Suggestions ✨

    CategorySuggestions                                                                                                                                                       
    Enhancement
    Add a comment explaining the purpose of the script.
    Suggestion Impact:The unclear example_script.py section was removed and replaced with instructions for running a specific example via pytest, including guidance to substitute the desired script path.

    code diff:

    -# Execute a python script
    -
    -Use this command to run a python script and follow the first script example
    +- Run all tests with every installed/supported Python interpreter:
     

    -python example_script.py
    +tox

    +
    +> Please have some patience - If you are doing it for the first time, it will take a little while to download the browser drivers
    +
    +- Run a specific example:
    +
    +```
    +pytest path/to/test_script.py
    +```
    +
    +> Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run
    

    It's recommended to provide a brief explanation or comment about what example_script.py
    does or what it's used for, especially for new users or readers who might not be familiar
    with the script. This can be added just before the command to run the script.

    examples/python/README.md [37]

    +# This script demonstrates basic Python operations.
    python example_script.py

    
    
    Maintainability
    Verify and maintain the accuracy of the linked path in the documentation.
    Suggestion Impact:The commit updated all the line references in the gh-codeblock shortcodes throughout the document, including the Python README reference mentioned in the suggestion. The commit shows careful attention to maintaining accurate line references by updating them and even expanding to include ranges (e.g., L18-19 instead of just L19).

    code diff:

     {{< tab header="Python" >}}
     {{< gh-codeblock path="examples/python/README.md#L37" >}}
    -{{< /tab >}}

    Ensure that the path specified in the gh-codeblock shortcode correctly points to the
    relevant section of the README. If the line number changes in the README, this reference
    will need to be updated to maintain accuracy.

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

    -{{< gh-codeblock path="examples/python/README.md#L37" >}}
    +{{< gh-codeblock path="examples/python/README.md#L37" >}}  # Ensure this line number is kept updated with any changes in the README.
     

    @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 @sadik312 ,

    Thank you the PR. Could you please make similar changes to other translated files too.

    Thanks,
    Sri

    @sadik312

    sadik312 commented May 7, 2024

    Copy link
    Copy Markdown
    Author

    HI @sadik312 ,

    Thank you the PR. Could you please make similar changes to other translated files too.

    Thanks, Sri

    Hi @harsha509 ,
    Yes, I will make the changes to the other files too.
    Thanks

    @sadik312
    sadik312 requested a review from harsha509 May 9, 2024 15:09

    @sadik312 sadik312 left a comment

    Copy link
    Copy Markdown
    Author

    Choose a reason for hiding this comment

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

    I have added README.md files for the examples for:

    • dotnet
    • java
    • kotlin

    I have added the file execution command for:

    • python

    I have also reflected all of the changes in the first_script.en.md file

    @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 @sadik312 ,

    Thank you for the changes. However, there seem to be some conflicts within the PR. Please could you resolve these when you get a chance?

    Thanks,
    Sri

    @sadik312

    sadik312 commented Jul 9, 2024

    Copy link
    Copy Markdown
    Author

    Hi @harsha509,
    I have fixed the conflict. I added the guide for Gradle and someone else added the guide for Maven and I have merged the 2 together. Please let me know if there are any other issues.
    Thank you,
    Sadik

    @sadik312
    sadik312 requested a review from harsha509 July 9, 2024 10:36
    Comment thread examples/dotnet/README.md
    @sadik312
    sadik312 requested a review from harsha509 November 7, 2024 13:29
    @harsha509

    Copy link
    Copy Markdown
    Contributor

    Hi @sadik312 ,

    Also could you please resolve conflicts!

    Thanks,
    Sri

    A1exKH

    This comment was marked as spam.

    @sadik312

    Copy link
    Copy Markdown
    Author

    Hi @harsha509,
    Would you be able to approve this PR?
    Thank you

    @A1exKH A1exKH left a comment

    Copy link
    Copy Markdown

    Choose a reason for hiding this comment

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

    LGTM.

    @sadik312

    sadik312 commented Mar 3, 2025

    Copy link
    Copy Markdown
    Author

    Hi @harsha509,
    Just wanted to check if you could review my PR when you have some time. Let me know if any changes are needed. Thank you

    @qodo-code-review

    qodo-code-review Bot commented Jul 22, 2026

    Copy link
    Copy Markdown
    Contributor

    Code Review by Qodo

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

    Context used
    ✅ Compliance rules (platform): 10 rules

    Grey Divider


    Action required

    1. Stale Python codeblock anchors 🐞 Bug ☼ Reliability
    Description
    Several docs pages still embed examples/python/README.md#L35, but after this PR’s rewrite of the
    Python README, line 35 is now the closing ``` fence. Those pages will render an incorrect/empty
    snippet until their anchors are updated.
    
    Code

    website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[R235-240]

    {{< tab header="Python" >}}
    -{{< gh-codeblock path="examples/python/README.md#L35" >}}
    +{{< gh-codeblock path="/examples/python/README.md#L58" >}}
    {{< /tab >}}
    {{< tab header="CSharp" >}}
    -{{< badge-code >}}
    +{{< gh-codeblock path="/examples/dotnet/README.md#L52" >}}
    {{< /tab >}}
    Evidence
    Docs pages still point at #L35, but in the rewritten Python README line 35 is the closing code
    fence, so the embedded snippet will not contain the intended command.
    

    examples/python/README.md[31-36]
    website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md[235-241]
    website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md[225-231]
    website_and_docs/content/documentation/webdriver/getting_started/first_script.pt-br.md[231-239]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ### Issue description
    This PR updates the Python snippet anchor in `first_script.en.md` from `#L35` to `#L58`, but other docs pages still reference `examples/python/README.md#L35`. Since the Python README was rewritten, `#L35` now points at the closing code fence, not the intended command.
    
    ### Issue Context
    At present, multiple pages still reference `#L35` (e.g., `using_selenium.*` and `first_script` translations).
    
    ### Fix Focus Areas
    - website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[233-240]
    
    ### Suggested fix
    Find and update all remaining occurrences of `examples/python/README.md#L35` to the correct new line (or preferably a small line range around the exact command you want to show, e.g. `#L33-L35` for `pip install -r requirements.txt` or `#L57-L59` for the `pytest ...` example), including translated pages (`first_script.ja/pt-br/zh-cn.md`, `using_selenium.*.md`).
    

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


    2. C# run command wrong path ✓ Resolved 🐞 Bug ≡ Correctness
    Description
    The new .NET README tells users to cd into examples/dotnet/SeleniumDocs and then run `dotnet run
    HelloSelenium.cs, but HelloSelenium.cs is located in examples/dotnet/` (one directory above).
    Users following the documented steps won’t be able to run the file from the stated working
    directory.
    
    Code

    examples/dotnet/README.md[R25-53]

    +## Navigate to the .NET directory
    +### Change into the .NET examples directory:
    +
    +```bash
    +cd seleniumhq.github.io/examples/dotnet/SeleniumDocs
    +```
    +
    +## Running the Tests
    +### Restore dependencies
    +Install necessary dependencies using the .NET CLI:
    +
    +```bash
    +dotnet restore
    +```
    +
    +### Run all tests
    +To run all available tests:
    +
    +```bash
    +dotnet test
    +```
    +
    +# Execute a C# script
    +
    +Use this command to run a C# script and follow the first script example
    +
    +```
    +dotnet run HelloSelenium.cs
    +```
    Evidence
    The README’s cd step puts the user in .../examples/dotnet/SeleniumDocs, but the referenced file
    is stored at examples/dotnet/HelloSelenium.cs, so the subsequent command references a file not in
    the current directory.
    

    examples/dotnet/README.md[25-53]
    examples/dotnet/HelloSelenium.cs[1-14]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ### Issue description
    The .NET README changes into `examples/dotnet/SeleniumDocs` but later references `HelloSelenium.cs` without a relative path. In this repo, `HelloSelenium.cs` is not in `SeleniumDocs`, so the command is inconsistent with the earlier `cd` instruction.
    
    ### Issue Context
    `HelloSelenium.cs` is located at `examples/dotnet/HelloSelenium.cs`.
    
    ### Fix Focus Areas
    - examples/dotnet/README.md[25-53]
    
    ### Suggested fix
    Either:
    1) Change the working directory step to `cd seleniumhq.github.io/examples/dotnet` before showing a command that references `HelloSelenium.cs`, or
    2) Keep the `SeleniumDocs` working directory but update the run command to reference the correct relative path (e.g., `../HelloSelenium.cs`) and/or replace it with a command that runs the existing `SeleniumDocs` project/tests (e.g., `dotnet test --filter ...`) depending on the intended workflow.
    

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


    3. Wrong Java compile filename ✓ Resolved 🐞 Bug ≡ Correctness
    Description
    The new Java README instructs users to compile FirstScript.js, but the repository’s getting
    started example is FirstScript.java (and it lives under src/test/java/...). Following the README
    will fail because the referenced .js file does not exist in the repo.
    
    Code

    examples/java/README.md[R29-35]

    +# Compile a java file
    +
    +Use this command to compile a java script and follow the first script example
    +
    +```
    +javac FirstScript.js
    +```
    Evidence
    The README references FirstScript.js, but the repo contains FirstScript.java (in a package)
    under src/test/java, so the referenced filename/extension is incorrect.
    

    examples/java/README.md[29-35]
    examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java[1-14]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ### Issue description
    `examples/java/README.md` tells users to compile `FirstScript.js`, but the actual example is `FirstScript.java` in a nested path. This makes the README’s “compile a java file” instructions unusable.
    
    ### Issue Context
    The Java getting started example is `examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java`.
    
    ### Fix Focus Areas
    - examples/java/README.md[29-43]
    
    ### Suggested fix
    Replace the `javac`/`java` snippet with a command that actually works in this repo (for example, point users to the existing Maven exec command already documented later in the same README), or update the snippet to reference the correct `.java` file path and required classpath (if you want to keep a raw `javac` example).
    

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



    Remediation recommended

    4. C# run needs .NET 10 ✓ Resolved 🐞 Bug ≡ Correctness
    Description
    The getting-started page embeds only the dotnet run HelloSelenium.cs command, but that command
    requires .NET 10+ while the .NET README prerequisites still state “.NET SDK (8.0 or later)”, so
    readers following prerequisites may hit a non-working command. This is an inconsistency between the
    embedded snippet and the documented minimum SDK requirement.
    
    Code

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

    +{{< gh-codeblock path="/examples/dotnet/README.md#L32-L33" >}}
    Evidence
    The .NET README simultaneously states a general prerequisite of .NET SDK 8.0+ and a specific
    requirement of .NET 10+ for running HelloSelenium.cs; the getting-started page embeds only the two
    command lines, so readers may not see the .NET 10 requirement before running it.
    

    examples/dotnet/README.md[11-16]
    examples/dotnet/README.md[25-34]
    website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[229-240]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ## Issue description
    The getting-started page embeds the C# run command without the accompanying SDK requirement, while the .NET examples README lists a lower SDK prerequisite than the single-file run feature needs.
    
    ## Issue Context
    The `dotnet run HelloSelenium.cs` flow relies on .NET 10 "file-based apps"; users with only .NET 8/9 (as implied by prerequisites) may fail.
    
    ## Fix Focus Areas
    - website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[239-239]
    - examples/dotnet/README.md[25-34]
    - examples/dotnet/README.md[11-16]
    
    ## Suggested fix
    - Update the .NET README prerequisites to explicitly cover both cases (e.g., “.NET 8+ to run tests; .NET 10+ to run `HelloSelenium.cs` directly”), and/or
    - Add a short note in `first_script.en.md` near the CSharp run snippet indicating the .NET 10+ requirement for this command (so the embedded snippet is not missing critical prerequisites).
    

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


    5. Kotlin compile command wrong path ✓ Resolved 🐞 Bug ≡ Correctness
    Description
    The new Kotlin README tells users to run kotlinc FirstScriptTest.kt ... from examples/kotlin,
    but FirstScriptTest.kt is stored under src/test/kotlin/dev/selenium/getting_started/. The
    command will fail because the referenced file is not in the working directory.
    
    Code

    examples/kotlin/README.md[R30-35]

    +# Compile kotlin script and follow the first script example
    +
    +Compile kotlin file
    +```
    +kotlinc FirstScriptTest.kt -include-runtime -d FirstScriptTest.jar
    +```
    Evidence
    The README references FirstScriptTest.kt as if it were in examples/kotlin, but the repository
    stores it under src/test/kotlin/..., so the documented command won’t find the file.
    

    examples/kotlin/README.md[30-35]
    examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt[1-5]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ### Issue description
    The Kotlin README’s `kotlinc FirstScriptTest.kt ...` command assumes `FirstScriptTest.kt` is in the current directory, but the actual file lives under `src/test/kotlin/...`.
    
    ### Issue Context
    Current file location: `examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt`.
    
    ### Fix Focus Areas
    - examples/kotlin/README.md[30-35]
    
    ### Suggested fix
    Either update the compile command to use the correct relative path (or instruct users to `cd` into the directory containing the file), or replace the standalone compilation instructions with a repo-supported command (e.g., Maven invocation) that runs the example/tests.
    

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


    6. Stale Java #L60 reference ✓ Resolved 📘 Rule violation ≡ Correctness
    Description
    examples/java/README.md gained substantial new content at the top, shifting line numbers, but the
    docs still embed examples/java/README.md#L60 for the Java tab, so the gh-codeblock now pulls the
    wrong snippet. This violates the requirement to update gh-codeblock line references when
    referenced examples/ content changes, and #L60 now points to “Clone the repository” rather than
    the intended “run specific example” command.
    
    Code

    examples/java/README.md[R1-45]

    +# Running all tests from Selenium java example using gradle
    +
    +Follow these steps to run all test examples from selenium java
    +
    +1. Clone this repository
    +
    +```
    +git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
    +```
    +
    +2. Navigate to `java` directory
    +
    +```
    +cd seleniumhq.github.io/examples/java
    +```
    +
    +3. Install & build dependencies using grandlew
    +
    +```
    +gradle build
    +```
    +
    +4. Run all tests
    +
    +```
    +gradle test
    +```
    +
    +# Compile a java file
    +
    +Use this command to compile a java script and follow the first script example
    +
    +```
    +javac FirstScript.js
    +```
    +
    +# Execute a java file
    +
    +Use this command to run a java file
    +
    +```
    +java FirstScript
    +```
    +
    +# Running Selenium Java Tests Using Maven
    Evidence
    PR Compliance ID 2141349 requires updating gh-codeblock line references after changes to
    examples/ files. The Getting Started documentation still references examples/java/README.md#L60,
    but after the new Gradle section and other content were added to the top of
    examples/java/README.md, line 60 now corresponds to the ### Clone the repository heading instead
    of the intended run command; the actual “run a specific example” command is later in the file
    (around line 104), demonstrating that the embedded target has drifted and the reference must be
    updated.
    

    Rule 2141349: Update gh-codeblock line ranges when examples change
    website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[231-234]
    examples/java/README.md[29-43]
    examples/java/README.md[60-68]
    website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[231-237]
    examples/java/README.md[101-105]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ## Issue description
    The Getting Started documentation embeds a Java snippet using `gh-codeblock path="examples/java/README.md#L60"`, but `examples/java/README.md` was expanded at the top, shifting line numbers so that `#L60` now extracts the wrong content (it points to the “Clone the repository” section rather than the intended “run a specific example” command).
    
    ## Issue Context
    The docs page embeds specific lines from the examples READMEs via `gh-codeblock path="...#L..."`, so whenever README content shifts, these anchors must be updated to keep the embedded snippet correct (per PR Compliance ID 2141349). In the updated `examples/java/README.md`, the actual “run a specific example” command is now later in the file (around line 104), so the documentation’s `#L60` reference is stale and should be updated to the correct new line and preferably a tight line range around the command to reduce future drift.
    
    ## Fix Focus Areas
    - website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[231-234]
    - examples/java/README.md[1-107]
    

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


    View more (2)
    7. Fenced code blocks in examples/* 📘 Rule violation ✧ Quality
    Description
    The updated examples/*/README.md files add runnable command snippets using raw fenced code blocks
    instead of the required gh-codeblock shortcode. This can break consistency and any tooling that
    expects gh-codeblock-wrapped runnable snippets in the examples/ directory.
    
    Code

    examples/python/README.md[R5-7]

    git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git

    Evidence
    PR Compliance ID 2141347 requires runnable snippets under examples/ to use the gh-codeblock
    shortcode. The cited README sections add runnable commands (e.g., pytest, git clone, `dotnet
    run, java -jar) inside raw fenced code blocks instead of gh-codeblock`.
    

    Rule 2141347: Use gh-codeblock shortcode for runnable examples in examples/ directory
    examples/python/README.md[43-51]
    examples/java/README.md[7-27]
    examples/dotnet/README.md[21-45]
    examples/kotlin/README.md[33-42]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ## Issue description
    Runnable command snippets in `examples/*/README.md` are currently written as raw fenced code blocks (```). The compliance requirement for the `examples/` directory is to wrap runnable snippets using the `gh-codeblock` shortcode.
    
    ## Issue Context
    Multiple READMEs under `examples/` were changed/added in this PR and include new runnable command blocks.
    
    ## Fix Focus Areas
    - examples/python/README.md[5-59]
    - examples/java/README.md[7-43]
    - examples/dotnet/README.md[21-53]
    - examples/kotlin/README.md[7-42]
    

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


    8. tox not installed by steps ✓ Resolved 🐞 Bug ≡ Correctness
    Description
    The updated Python README instructs running tox after installing only requirements.txt, but
    tox is not listed in requirements.txt. In a fresh virtualenv following these steps, tox will
    typically not be available.
    
    Code

    examples/python/README.md[R47-51]

    +- Run all tests with every installed/supported Python interpreter:
    
    -## Execute a specific example
    -To run a specific Selenium Python example, use the following command:
    -```bash
    +```
    +tox
    +```
    Evidence
    The README tells users to run tox, but the only documented install step is `pip install -r
    requirements.txt, and that requirements file does not include tox`.
    

    examples/python/README.md[47-51]
    examples/python/requirements.txt[1-7]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ### Issue description
    `examples/python/README.md` documents a `tox` workflow but the preceding install step only installs `requirements.txt`, which does not include `tox`. This makes the documented `tox` step non-reproducible.
    
    ### Issue Context
    `examples/python/requirements.txt` currently lists selenium/pytest/etc. but not tox.
    
    ### Fix Focus Areas
    - examples/python/README.md[47-51]
    - examples/python/requirements.txt[1-7]
    
    ### Suggested fix
    Either add `tox` to the documented installation steps (e.g., include it in requirements or explicitly instruct `pip install tox`), or remove the `tox` instruction if it’s not supported in this repo.
    

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



    Informational

    9. Kotlin heading hierarchy drift ✓ Resolved 🐞 Bug ⚙ Maintainability ⭐ New
    Description
    The Kotlin README introduces a second top-level # heading for “Run a single Kotlin example”,
    making this section look like a separate document rather than a subsection. The accompanying
    sentence is also awkwardly phrased and can be tightened to describe the command more clearly.
    
    Code

    examples/kotlin/README.md[R30-32]

    +# Run a single Kotlin example
    +
    +Use this command to run the test for a specific Kotlin example and follow the first script example
    Evidence
    The file already has a top-level # title at the start, and the new section adds another # header
    plus an unclear description line, which indicates heading-hierarchy and clarity drift introduced in
    the updated lines.
    

    examples/kotlin/README.md[1-3]
    examples/kotlin/README.md[30-32]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ### Issue description
    The README uses multiple H1 (`#`) headings and the new section’s description is awkwardly worded.
    
    ### Issue Context
    This is a README intended to be read as a single document; the “single example” section is a subsection of the overall instructions.
    
    ### Fix Focus Areas
    - examples/kotlin/README.md[30-32]
    
    ### Suggested change
    - Change `# Run a single Kotlin example` to `## Run a single Kotlin example`.
    - Reword line 32 to something like: “Run only the first-script example test:” (or similar), keeping the intent but improving clarity.
    

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


    10. Kotlin section misnamed script ✓ Resolved 🐞 Bug ⚙ Maintainability
    Description
    The Kotlin README section title says “Execute a kotlin script,” but the command shown runs a Maven
    Surefire-selected JUnit test class (FirstScriptTest) rather than a standalone Kotlin script. This
    wording mismatch can confuse users about what is being executed, especially since the
    getting-started page embeds only that command line.
    
    Code

    examples/kotlin/README.md[R30-35]

    +# Execute a kotlin script
    +
    +Use this command to run a specific Kotlin example and follow the first script example
    +
    +```
    +mvn -Dtest=dev.selenium.getting_started.FirstScriptTest test
    Evidence
    The README’s command selects dev.selenium.getting_started.FirstScriptTest via Maven’s test
    mechanism, and the referenced class is clearly a JUnit test (annotated with @Test) under
    src/test/kotlin, not a standalone script file.
    

    examples/kotlin/README.md[30-36]
    examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt[10-36]
    website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[245-249]

    Agent prompt
    The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
    
    ## Issue description
    The Kotlin README describes running a JUnit test via Maven as executing a “kotlin script,” which is terminology that suggests `.kts`/standalone script execution.
    
    ## Issue Context
    The embedded command targets a JUnit test class located under `src/test/kotlin`.
    
    ## Fix Focus Areas
    - examples/kotlin/README.md[30-36]
    - website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[248-248]
    - examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt[10-36]
    
    ## Suggested fix
    - Rename the heading and/or sentence to something like “Run a single Kotlin example test” (or similar), and clarify it runs a JUnit test.
    - After adjusting the README text (which may shift line numbers), update the `gh-codeblock` anchor in `first_script.en.md` so it still points at the intended command.
    

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


    Grey Divider

    Qodo Logo

    Comment thread examples/python/README.md
    Comment on lines 5 to 7
    ```
    git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
    ```

    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.

    Remediation recommended

    1. Fenced code blocks in examples/* 📘 Rule violation ✧ Quality

    The updated examples/*/README.md files add runnable command snippets using raw fenced code blocks
    instead of the required gh-codeblock shortcode. This can break consistency and any tooling that
    expects gh-codeblock-wrapped runnable snippets in the examples/ directory.
    
    Agent Prompt
    ## Issue description
    Runnable command snippets in `examples/*/README.md` are currently written as raw fenced code blocks (```). The compliance requirement for the `examples/` directory is to wrap runnable snippets using the `gh-codeblock` shortcode.
    
    ## Issue Context
    Multiple READMEs under `examples/` were changed/added in this PR and include new runnable command blocks.
    
    ## Fix Focus Areas
    - examples/python/README.md[5-59]
    - examples/java/README.md[7-43]
    - examples/dotnet/README.md[21-53]
    - examples/kotlin/README.md[7-42]
    

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

    Comment thread examples/java/README.md Outdated
    Comment thread examples/java/README.md Outdated
    Comment thread examples/dotnet/README.md Outdated
    Comment thread examples/python/README.md
    Comment on lines +47 to +51
    - Run all tests with every installed/supported Python interpreter:

    ## Execute a specific example
    To run a specific Selenium Python example, use the following command:
    ```bash
    ```
    tox
    ```

    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.

    Remediation recommended

    5. Tox not installed by steps 🐞 Bug ≡ Correctness

    The updated Python README instructs running tox after installing only requirements.txt, but
    tox is not listed in requirements.txt. In a fresh virtualenv following these steps, tox will
    typically not be available.
    
    Agent Prompt
    ### Issue description
    `examples/python/README.md` documents a `tox` workflow but the preceding install step only installs `requirements.txt`, which does not include `tox`. This makes the documented `tox` step non-reproducible.
    
    ### Issue Context
    `examples/python/requirements.txt` currently lists selenium/pytest/etc. but not tox.
    
    ### Fix Focus Areas
    - examples/python/README.md[47-51]
    - examples/python/requirements.txt[1-7]
    
    ### Suggested fix
    Either add `tox` to the documented installation steps (e.g., include it in requirements or explicitly instruct `pip install tox`), or remove the `tox` instruction if it’s not supported in this repo.
    

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

    Comment on lines 235 to 240
    {{< tab header="Python" >}}
    {{< gh-codeblock path="examples/python/README.md#L35" >}}
    {{< gh-codeblock path="/examples/python/README.md#L58" >}}
    {{< /tab >}}
    {{< tab header="CSharp" >}}
    {{< badge-code >}}
    {{< gh-codeblock path="/examples/dotnet/README.md#L52" >}}
    {{< /tab >}}

    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.

    Action required

    6. Stale python codeblock anchors 🐞 Bug ☼ Reliability

    Several docs pages still embed examples/python/README.md#L35, but after this PR’s rewrite of the
    Python README, line 35 is now the closing ``` fence. Those pages will render an incorrect/empty
    snippet until their anchors are updated.
    
    Agent Prompt
    ### Issue description
    This PR updates the Python snippet anchor in `first_script.en.md` from `#L35` to `#L58`, but other docs pages still reference `examples/python/README.md#L35`. Since the Python README was rewritten, `#L35` now points at the closing code fence, not the intended command.
    
    ### Issue Context
    At present, multiple pages still reference `#L35` (e.g., `using_selenium.*` and `first_script` translations).
    
    ### Fix Focus Areas
    - website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md[233-240]
    
    ### Suggested fix
    Find and update all remaining occurrences of `examples/python/README.md#L35` to the correct new line (or preferably a small line range around the exact command you want to show, e.g. `#L33-L35` for `pip install -r requirements.txt` or `#L57-L59` for the `pytest ...` example), including translated pages (`first_script.ja/pt-br/zh-cn.md`, `using_selenium.*.md`).
    

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

    Comment thread examples/kotlin/README.md Outdated
    @qodo-code-review

    Copy link
    Copy Markdown
    Contributor

    Code review by qodo was updated up to the latest commit 4f9584e

    - dotnet: move the single-script section before the SeleniumDocs cd step,
      since HelloSelenium.cs lives one directory up (Qodo: wrong path)
    - java: drop the added Gradle/javac section - this project uses Maven, and
      the referenced FirstScript.js file doesn't exist (Qodo: wrong build tool
      and filename); trunk's existing Maven instructions already cover this
    - kotlin: replace the kotlinc/java -jar section with the actual working
      command, since FirstScriptTest.kt is a JUnit test class, not a
      standalone script (Qodo: wrong path, but also not runnable that way)
    - first_script.en.md: wire up the CSharp and Kotlin "Running Selenium
      File" tabs to the corrected content, and fix the CSharp line reference
      that had drifted after the dotnet README was restructured
    Comment thread examples/kotlin/README.md Outdated
    @qodo-code-review

    Copy link
    Copy Markdown
    Contributor

    Code review by qodo was updated up to the latest commit 576ccaf

    - dotnet: clarify that HelloSelenium.cs needs the .NET 10 SDK, since the
      general prerequisite only listed 8.0+ for the test suite
    - kotlin: rename "Execute a kotlin script" to "Run a single Kotlin example"
      since the command runs a JUnit test via Maven, not a standalone script
    - first_script.en.md: update the CSharp line reference after the dotnet
      README prerequisites section grew by two lines
    Comment thread examples/kotlin/README.md Outdated
    @qodo-code-review

    Copy link
    Copy Markdown
    Contributor

    Code review by qodo was updated up to the latest commit 1093d6b

    Demote "Run a single Kotlin example" from an H1 to an H2 so it reads as
    a subsection rather than a separate document, and tighten the wording.
    @qodo-code-review

    Copy link
    Copy Markdown
    Contributor

    Code review by qodo was updated up to the latest commit 1bdf865

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

    Labels

    documentation Improvements or additions to documentation enhancement New feature or request Review effort [1-5]: 2

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    5 participants