-
-
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] Created Method to return Keys.CONTROL or Keys.COMMAND based on User OS #15026
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍(Review updated until commit 77e8a04)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 77e8a04
Previous suggestions✅ Suggestions up to commit e8772e6
|
What about remote webdriver? |
We're discussing that on slack right now - short answer is that we haven't found a convenient solution for that. We're not sure if Playwright's implementation ControlOrMeta works on remote drivers either. |
User description
Description
Created Method to return Keys.CONTROL or Keys.COMMAND based on User OS
Added test to typing_tests.py
Motivation and Context
Issue #14835
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Added
COMMAND_OR_CONTROL
key toKeys
class for OS-specific behavior.Implemented logic to return
COMMAND
for macOS andCONTROL
for other OS.Added a test to validate
COMMAND_OR_CONTROL
functionality intyping_tests.py
.Ensured compatibility with existing functionality and test coverage.
Changes walkthrough 📝
keys.py
Introduced `COMMAND_OR_CONTROL` key for OS-specific behavior
py/selenium/webdriver/common/keys.py
COMMAND_OR_CONTROL
attribute toKeys
class.sys.platform
.typing_tests.py
Added test for `COMMAND_OR_CONTROL` key functionality
py/test/selenium/webdriver/common/typing_tests.py
COMMAND_OR_CONTROL
key functionality.keys.