Added command to run python script to follow first script example#1710
Added command to run python script to follow first script example#1710sadik312 wants to merge 23 commits into
Conversation
✅ Deploy Preview for selenium-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
PR Description updated to latest commit (2c7aeb6)
|
PR Review 🔍
|
PR Code Suggestions ✨
|
Hi @harsha509 , |
|
Hi @harsha509, |
|
Hi @sadik312 , Also could you please resolve conflicts! Thanks, |
|
Hi @harsha509, |
|
Hi @harsha509, |
Code Review by Qodo
Context used✅ Compliance rules (platform):
10 rules 1. Stale Python codeblock anchors
|
| ``` | ||
| git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git | ||
| ``` |
There was a problem hiding this comment.
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
| - 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 | ||
| ``` |
There was a problem hiding this comment.
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
| {{< 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 >}} |
There was a problem hiding this comment.
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
|
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
|
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
|
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.
|
Code review by qodo was updated up to the latest commit 1bdf865 |
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
Checklist
PR Type
documentation, enhancement
Description
examples/python/README.mdto provide users with the command to run a Python script, enhancing the usability of the examples.website_and_docs/content/documentation/webdriver/getting_started/first_script.en.mdto link directly to the newly added instructions in the examples README, improving the documentation's interactivity and user guidance.Changes walkthrough 📝
README.md
Add Python Script Execution Instructionsexamples/python/README.md
line.
first_script.en.md
Link Python Script Execution in Documentationwebsite_and_docs/content/documentation/webdriver/getting_started/first_script.en.md
README.