Retrieve all cookies visible to the current page. The cookies are returned as an array of cookie JSON object, as defined here.

Uses cookie protocol command.

Usage

.getCookies(callback)

Example

this.demoTest = function(browser) {
  browser.getCookies(function callback(result) {
    this.assert.equal(result.value.length, 1);
    this.assert.equals(result.value[0].name, 'test_cookie');
  });
}

Parameters

Name Type description
callback function

The callback function which will receive the response as an argument.

Returns

Type description
Array.<object> A list of cookies.

See also