pytest-dev/pytest-splinter

FutureWarning raised by `browser.cookies.delete()`

jace opened this issue · 1 comments

jace commented

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 commented

I missed the existing open PR in #172.