Delete the cookie with the given name. This command is a no-op if there is no such cookie visible to the current page.

Syntax

.deleteCookie(cookieName, [callback])

Parameters

Name Type description
cookieName string

The name of the cookie to delete.

callback
Optional
function

Optional callback function to be called when the command finishes.

Usage

this.demoTest = function(browser) {
  browser.deleteCookie("test_cookie", function() {
    // do something more in here
  });
}

See also