-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py]: handle named get_cookie and delete_cookie for None and empty strings
#15073
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
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
…y strings (SeleniumHQ#15073) * handle `None` and empty string case for `get_cookie()` and `delete_cookie()` * run `format.sh` * apply suggestion for test cases --------- Co-authored-by: Viet Nguyen Duc <[email protected]>
…y strings (SeleniumHQ#15073) * handle `None` and empty string case for `get_cookie()` and `delete_cookie()` * run `format.sh` * apply suggestion for test cases --------- Co-authored-by: Viet Nguyen Duc <[email protected]>
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
ValueErrorfor empty or whitespace cookie names inget_cookieanddelete_cookie.Updated
get_cookieanddelete_cookiedocstrings to reflect new behavior.Introduced new tests to verify
ValueErroris 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
ValueErrorfor empty or whitespace cookienames.
get_cookieanddelete_cookieto include newbehavior.
cookie_tests.py
Add tests for cookie name validationpy/test/selenium/webdriver/common/cookie_tests.py
get_cookieto raiseValueErrorfor empty names.delete_cookieto raiseValueErrorfor empty names.