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

Confirmed Issue #5751773 • Assigned to Stanley H.

Details

Created
Dec 8, 2015
Privacy
This issue is public.
Reports
Reported by 8 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.”

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

    Sign in