-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Properly verify Selenium Manager exists #16711
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
[py] Properly verify Selenium Manager exists #16711
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
navin772
left a comment
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
💥 What does this PR do?
This PR makes a slight change to the logic for finding the Selenium Manager binary, so it doesn't give a false positive if there is a directory named
selenium-managerwhere the executable should be if you build/install from source or a local sdist package. This also adds a check to verify the Selenium Manager binary exists if its location is specified in an environment variable, so it's clear why it is failing.It also converts some old string formatting to use f-strings and adds information to the docstring about where we look for the binary.
🔄 Types of changes
PR Type
Bug fix, Tests
Description
Fix false positive when directory named
selenium-managerexists instead of executableChange
compiled_path.exists()tocompiled_path.is_file()for proper verificationConvert string formatting to f-strings for consistency
Enhance docstring with binary search order and error conditions
Diagram Walkthrough
File Walkthrough
selenium_manager.py
Fix binary detection and modernize string formattingpy/selenium/webdriver/common/selenium_manager.py
compiled_path.exists()tocompiled_path.is_file()to properlyverify executable instead of accepting directories
%s) tof-strings
additional error condition documentation