-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
[py] Fix WebKitGTK driver name check #15046
[py] Fix WebKitGTK driver name check #15046
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Similar to WPEWebKit changes from 24d88d7, WebKitGTK does not follow the simple capitalization scheme for the driver name. This commit also changes the default `WebKitWebDriver` binary to the first one in `PATH` through shutil.which, instead of just the binary name. (Note: The effort to move to `pathlib` instead of `shutil`[1] is more related to shutil's functions that work on files and directories, like copy and move, instead of `which`, which just searches the executable paths for the given command.) [1] https://discuss.python.org/t/incrementally-move-high-level-path-operations-from-shutil-to-pathlib/19208
8710c35
to
2d59089
Compare
Updated addressing the docstring mishap. About the |
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.
Thank you, @lauromoura!
py: Fix WebKitGTK driver name. Similar to WPEWebKit changes from 24d88d7, WebKitGTK does not follow the simple capitalization scheme for the driver name. This commit also changes the default `WebKitWebDriver` binary to the first one in `PATH` through shutil.which, instead of just the binary name. (Note: The effort to move to `pathlib` instead of `shutil`[1] is more related to shutil's functions that work on files and directories, like copy and move, instead of `which`, which just searches the executable paths for the given command.) [1] https://discuss.python.org/t/incrementally-move-high-level-path-operations-from-shutil-to-pathlib/19208
User description
Description
Similar to WPEWebKit changes from 24d88d7, WebKitGTK does not follow the simple capitalization scheme for the driver name.
This commit also changes the default
WebKitWebDriver
binary to the first one inPATH
throughshutil.which
, instead of just the binary name.(Note: The effort to move to
pathlib
instead ofshutil
[1] is more related to shutil's functions that work on files and directories, like copy and move, instead ofwhich
, which just searches the executable paths for the given command.)[1] https://discuss.python.org/t/incrementally-move-high-level-path-operations-from-shutil-to-pathlib/19208
Motivation and Context
Without this fix, using the helper WebKitGTK driver class fails unconditionally. This affects running Selenium's own tests with WebkitGTK, for example (which we import into WebKit, alongside WPT's WebDriver tests).
Types of changes
Checklist
PR Type
Bug fix
Description
Fixed WebKitGTK driver name capitalization check in
conftest.py
.Updated
WebKitWebDriver
binary to useshutil.which
for path resolution.Ensured compatibility with WebKitGTK driver class for Selenium tests.
Changes walkthrough 📝
conftest.py
Fix WebKitGTK driver name capitalization check
py/conftest.py
WebKitGTK
.service.py
Update WebKitWebDriver binary resolution using `shutil.which`
py/selenium/webdriver/webkitgtk/service.py
DEFAULT_EXECUTABLE_PATH
to useshutil.which
.