This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25008 - Add delete cookie method
Summary: Add delete cookie method
Status: RESOLVED WONTFIX
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL: https://dvcs.w3.org/hg/webdriver/raw-...
Whiteboard:
Keywords:
Depends on:
Blocks: 20860
  Show dependency treegraph
 
Reported: 2014-03-11 21:02 UTC by Marc Fisher
Modified: 2014-07-13 20:06 UTC (History)
4 users (show)

See Also:


Attachments

Description Marc Fisher 2014-03-11 21:02:22 UTC

    
Comment 1 David Burns :automatedtester 2014-03-11 21:08:53 UTC
In addCookie[1] there is prose saying that if have a date in the past we should delete it. Do you think we need a new method on the remote end rather than just have the addCookie(date=1970-01-01)?



[1] https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html#methods-14
Comment 2 Marc Fisher 2014-03-13 22:46:48 UTC
The current Selenium WebDriver API has support for deleting cookies by name and for deleting all currently visible cookies. Deleting cookies by name could easily be accomplished with your proposed mechanism, so may not need to be carried over. However, it is often useful and convenient to be able to delete all visible cookies with a single call, so I would like to have this method.
Comment 3 Alexei Barantsev 2014-03-18 06:02:26 UTC
We need a method to delete a cookie by name AND path too (because it is possible to set a cookie with the same name on a subpath).
Comment 4 David Burns :automatedtester 2014-07-12 21:58:15 UTC
Since addCookie takes a cookie object, the cookie that needs deleting will need to have all the necessary keys filled with the date in the past.

Agreed in the F2F not to add a separate endpoint and method for this.
Comment 5 Andrey Botalov 2014-07-13 07:45:24 UTC
It looks like the spec currently doesn't have endpoint to neither delete one cookie, nor to delete all cookies.

However, currently Webdriver does have endpoint to delete all cookies.

Is it intentional?
Comment 6 David Burns :automatedtester 2014-07-13 20:06:19 UTC
(In reply to Andrey Botalov from comment #5)
> It looks like the spec currently doesn't have endpoint to neither delete one
> cookie, nor to delete all cookies.
> 
> However, currently Webdriver does have endpoint to delete all cookies.
> 
> Is it intentional?

Yes this is. The spec doesn't always agree with the current implementation at least for now. This will converge around Selenium 3