-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Help Make Bazel Python Tests More Robust #15813
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
Help Make Bazel Python Tests More Robust #15813
Conversation
- Added WebDriverWaits to any dynamic elements to ensure they are loaded before interacting with them. - Increase some implicit waits to handle slower environments to hopefully prevent as many rebuilds. - Made use of pytest.fail to output clearer failure reporting when elements arent found within the timeout. - Added some retry mechanisms such as loops to retry a few times before failing.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
@cgoldberg I tried to make some of the tests more robust as you suggested by implementing better waits, retries, logging, etc.. Let me know if you see any issues with this :) |
PR Code Suggestions ✨Explore these optional code suggestions:
|
Id love feedback from anyone on the bots suggestion:
Should I remove the retries to prevent false positives? |
- Implement the PR bots suggestions to add a sleep between retries.
I took the bots suggestion and added |
I don't think we have any problems with I don't think the changes to I appreciate the effort, but I am going to close this. |
@cgoldberg Yea I think you're right. Even after my implementation the RBE tests remained flaky. Thanks for looking at the PR. |
User description
💥 What does this PR do?
I tried making these tests a bit more robust to save some cycles when reviewing PRs. This addresses issues like these: https://github.com/SeleniumHQ/selenium/actions/runs/15311089476/job/43079844718 which causes contributors/reviewers to rerun tests multiple times.
PR Type
Tests
Description
Added explicit waits and retries to Python Bazel tests
Improved failure reporting with pytest.fail and clearer messages
Increased timeouts to handle slower environments
Enhanced robustness for dynamic element interactions
Changes walkthrough 📝
devtools_tests.py
Add waits, retries, and better failure handling to devtools tests
py/test/selenium/webdriver/common/devtools_tests.py
calls
implicit_waits_tests.py
Use explicit waits and improved error handling in implicit waits tests
py/test/selenium/webdriver/common/implicit_waits_tests.py
timeouts
TimeoutException