MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / grabCookie

Method grabCookie

lib/helper/Puppeteer.js:1901–1906  ·  view source on GitHub ↗

* {{> grabCookie }} * * Returns cookie in JSON format. If name not passed returns all cookies for this domain.

(name)

Source from the content-addressed store, hash-verified

1899 * Returns cookie in JSON format. If name not passed returns all cookies for this domain.
1900 */
1901 async grabCookie(name) {
1902 const cookies = await this.page.cookies()
1903 if (!name) return cookies
1904 const cookie = cookies.filter(c => c.name === name)
1905 if (cookie[0]) return cookie[0]
1906 }
1907
1908 /**
1909 * {{> waitForCookie }}

Callers 8

auth.jsFile · 0.45
captureStorageStateFunction · 0.45
Playwright_test.jsFile · 0.45
testsFunction · 0.45
session_test.jsFile · 0.45

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected