Can't delete cookies

Fixed Issue #5751773

Details

Created
Dec 8, 2015
Privacy
This issue is public.
Reports
Reported by 10 people

Sign in to watch or report this issue.

Steps to reproduce

Lots of people like to start the browser then delete all cookies. This works great in Chrome (which starts at data;) but fails in Edge (which starts at about:start, but also fails with about:blank)

webDriver =
new

EdgeDriver
(
@"C:\Program Files (x86)\Microsoft Web
Driver"
);

                   
webDriver.Manage().Timeouts().SetPageLoadTimeout(
new

TimeSpan
(0, 0, 0, 0, 120000));

webDriver.Manage().Window.Maximize();

webDriver.Manage().Cookies.DeleteAllCookies();

NOTICE: You get an exception

EXPECT: it should work

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To from “Mara P.” to “Ben B.”

      Changed Status to “Confirmed”

      Changed Title from “cannot delete cookies from Edge via webdriver when navigated to about:start or about:blank” to “cannot delete cookies from Edge via webdriver when navigated to about:start or about:blank (deleteAllCookies)”

      Changed Title from “cannot delete cookies from Edge via webdriver when navigated to about:start or about:blank (deleteAllCookies)” to “cannot delete cookies from Edge via webdriver when navigated to about:start or about:blank (deleteAllCookies)”

    • Wanted to add that it doesn’t matter if you are on the start page or not. There is an error whenever attempting to delete a cookie. Backtrace from Ruby code; Note that you can add a cookie, but not delete it:

      -> POST session/A6841A76-907C-4067-BC2C-47E6FE333869/cookie

      http://localhost:17556/session/A6841A76-907C-4067-BC2C-47E6FE333869/cookie | {"cookie":{"name":"foo","value":"bar","path":"/","secure":false}}
      <- {"sessionId":"A6841A76-907C-4067-BC2C-47E6FE333869","status":0,"value":null}
      -> DELETE session/A6841A76-907C-4067-BC2C-47E6FE333869/cookie/foo
      <- {"sessionId":"A6841A76-907C-4067-BC2C-47E6FE333869","status":13,"value":{"message":"Unknown error"}}

    • Has there been a fix for this? I’m experiencing it with Selenium WebDriver 2.52, MS Edge 10586, Java bindings

    • in general most web drivers need to have a page open to clear cookies. You may bypass it by several simple tricks. For Edge the following functions properly (C#):

                          ((EdgeDriver)driver).Navigate().GoToUrl(page);
                          try
                          {
                              ((EdgeDriver)driver).Manage().Cookies.DeleteAllCookies();
                          }
                          catch (Exception e)
                          {
      
                          }
                          ((EdgeDriver)driver).Navigate().Refresh();
      

      Regards
      bp

    • Microsoft Edge Team

      Changed Assigned To from “Ben B.” to “Clay M.”

      Changed Assigned To from “Clay M.” to “Stanley H.”

    • Just to clarify, this problem is NOT limited to just about:blank and about:start, right? Contrary to the bug’s title. It sounded to me like that’s what Titus was saying, anyway, and that is consistent with my experience now with build 15063 – I can visit arbitrary domains and set cookies, but can’t delete them.

    • That is correct, since I can’t edit the issue, I tried to clarify in the first comment
      Also, I haven’t checked this since January, so I have no input on its current status

    • Microsoft Edge Team

      Changed Title from “cannot delete cookies from Edge via webdriver when navigated to about:start or about:blank (deleteAllCookies)” to “Cannot delete cookies”

      Changed Title from “Cannot delete cookies” to “Can't delete cookies”

    • Is this an issue that MS Edge team is working on? I see it is marked as External and I wasn’t sure if that meant it was not being worked on (and since it’s been open since 2015.

      Thanks

    • Microsoft Edge Team

      Changed Assigned To from “Stanley H.” to “John J.”

      Changed Status from “Confirmed” to “Fixed”

    • This is fixed and should show up in future insider builds.

    You need to sign in to your Microsoft account to add a comment.

    Sign in