nightwatch
Version:
Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.
36 lines (31 loc) • 774 B
JavaScript
const ClientCommand = require('./_base-command.js');
/**
* Delete all cookies visible to the current page.
*
* @example
* this.demoTest = function(browser) {
* browser.deleteCookies(function() {
* // do something more in here
* });
* }
*
*
* @method deleteCookies
* @syntax .deleteCookies([callback])
* @param {function} [callback] Optional callback function to be called when the command finishes.
* @api protocol.cookies
* @see cookie
* @deprecated In favour of `.cookies.deleteAll()`.
*/
class DeleteCookie extends ClientCommand {
get returnsFullResultObject() {
return true;
}
static get isTraceable() {
return true;
}
performAction(callback) {
this.api.cookie('DELETE', callback);
}
}
module.exports = DeleteCookie;