Taiko
Documentation

Home / API Reference

deleteCookies

Deletes browser cookies with matching name and URL or domain/path pair. If cookie name is not given or empty, all browser cookies are deleted.

Examples

await deleteCookies() # clears all browser cookies
await deleteCookies("CSRFToken", {url: "http://the-internet.herokuapp.com"})
await deleteCookies("CSRFToken", {domain: "herokuapp.com"})

Parameters


cookieName string

Cookie name.

Default value
undefined

options

options.url string

deletes all the cookies with the given name where domain and path match provided URL. eg: https://google.com

Default value
undefined

options.domain string

deletes only cookies with the exact domain. eg: google.com

Default value
undefined

options.path string

deletes only cookies with the exact path. eg: Google/Chrome/Default/Cookies/..

Default value
undefined

Returns

Promise<void>