Skip to content
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

FutureWarning raised by browser.cookies.delete() #174

Open
jace opened this issue Feb 6, 2023 · 1 comment
Open

FutureWarning raised by browser.cookies.delete() #174

jace opened this issue Feb 6, 2023 · 1 comment

Comments

@jace
Copy link

jace commented Feb 6, 2023

Pytest-Splinter's browser fixture deletes cookies by calling browser.cookies.delete():

try:
browser.cookies.delete()
except (IOError, HTTPException, WebDriverException):
LOGGER.warning("Error cleaning browser cookies", exc_info=True)
for url in splinter_clean_cookies_urls:
browser.visit(url)
browser.cookies.delete()

This is causing a FutureWarning under splinter 0.19:

…/splinter/driver/webdriver/cookie_manager.py:24: FutureWarning: Deleting all cookies via CookieManager.delete() with no arguments has been deprecated. use CookieManager.delete_all().

Splinter's documentation has been updated to recommend calling delete_all(): https://splinter.readthedocs.io/en/latest/cookies.html#delete-all-cookies

@jace
Copy link
Author

jace commented Feb 6, 2023

I missed the existing open PR in #172.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant