Protractor: browser.manage().DeleteAllCookies() Not Deleting Cookies in Firefox

Created on 28 Apr 2016  路  6Comments  路  Source: angular/protractor

Bug report

  • Node Version: v4.4.3
  • Protractor Version: 3.2.2
  • Browser(s): Firefox
  • Operating System and Version Linux

I have tried browser.manage().deleteAllCookies() as well as browser.driver.manage().deleteAllCookies() but nothing seems to actually clear the cookies. I was hoping that it would remove all cookies in the browser, but it doesn't seem to do that.

I have looked on other forums and they say that this should work, so wondering if there is something else I am missing on this. Thanks!

needs more info

Most helpful comment

It even doesn't work in IE and Edge. Any thoughts?

All 6 comments

As a note, I also just upgrade to version 3.3 and I still get the same error.

Looking at the selenium-webdriver api, deleteAllCookies should work as described. The delete all cookies returns a promise, are you waiting for the promise to return?

@return {!promise.Promise<void>} A promise that will be
resolved when all cookies have been deleted.

Do you know which version of protractor this worked in?

Yeah I believe I am waiting to resolve. I am not sure when this was actually working though, but I was on gitter IM and someone said they had it working in chrome at some point, but not real details. Here is my code:

    this.Before("@clearSession", function (scenario, callback) {
        browser.deleteAllCookies().then(function(){
            callback();
        });
    });

@cnishina I see that you needed more information on this one, is there anything else I can provide for you? Thanks!

Hi,

I have got the same issue here. It works well in chrome, but it does not work in Firefox.

It even doesn't work in IE and Edge. Any thoughts?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psech picture psech  路  3Comments

vishalshivnath picture vishalshivnath  路  3Comments

amedvedjev picture amedvedjev  路  3Comments

smarts picture smarts  路  3Comments

gamecheck80 picture gamecheck80  路  3Comments