-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
petesong/Add a Python example for the test practice #1924
base: trunk
Are you sure you want to change the base?
petesong/Add a Python example for the test practice #1924
Conversation
Use `python + pytest + selenium` to test the Todo page with the best test practices: "ActionBot" and "LoadableComponent"
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
As suggested, 1. Break the long and complex example down into smaller, more manageable sections or separate files for better readability and maintainability 2. Use a `with` context manager for WebDriver to ensure proper resource cleanup 3. Use specific exception handling instead of a bare except clause 4. Convert static method to instance method for consistency and flexibility 5. Add assertions to verify initial state in test methods 6. Remove the commented code in the `hover` method
Applied the suggestions. |
Applied the suggestions. |
Thank you for the contribution @PeteSong! Before it can be properly reviewed a few things must be changed:
|
example for using best practice
…teSong/seleniumhq.github.io into petesong/add-practice-example
DONE |
Awesome, thank you! @harsha1502 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PeteSong please resolve conflicts for this PR.
DONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
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
Motivation and Context
For the test practices, there's no python example.
Types of changes
Checklist
hugo server
to render the site/docs locally, but failed. Since I only have minor changes in the existing pages, and I am sure it works.PR Type
Documentation, Tests
Description
Changes walkthrough 📝
README.md
Update Hugo installation link and instructions
README.md
design_strategies.en.md
Add Python example for test practices with Selenium
website_and_docs/content/documentation/test_practices/design_strategies.en.md