-
-
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]: handle named get_cookie
and delete_cookie
for None and empty strings
#15073
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
250b9c7
to
9664721
Compare
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Addresses #15044 for py bindings.
Motivation and Context
Types of changes
Checklist
PR Type
Bug fix, Tests
Description
Added validation to raise
ValueError
for empty or whitespace cookie names inget_cookie
anddelete_cookie
.Updated
get_cookie
anddelete_cookie
docstrings to reflect new behavior.Introduced new tests to verify
ValueError
is raised for invalid cookie names.Ensured existing functionality remains unaffected by the changes.
Changes walkthrough 📝
webdriver.py
Add validation for cookie name in `get_cookie` and `delete_cookie`
py/selenium/webdriver/remote/webdriver.py
ValueError
for empty or whitespace cookienames.
get_cookie
anddelete_cookie
to include newbehavior.
cookie_tests.py
Add tests for cookie name validation
py/test/selenium/webdriver/common/cookie_tests.py
get_cookie
to raiseValueError
for empty names.delete_cookie
to raiseValueError
for empty names.