docs: improve addCookies.cookie parameter description (#31456)
This commit is contained in:
parent
41b185d643
commit
111876d526
|
|
@ -357,18 +357,14 @@ await context.AddCookiesAsync(new[] { cookie1, cookie2 });
|
||||||
- `cookies` <[Array]<[Object]>>
|
- `cookies` <[Array]<[Object]>>
|
||||||
- `name` <[string]>
|
- `name` <[string]>
|
||||||
- `value` <[string]>
|
- `value` <[string]>
|
||||||
- `url` ?<[string]> either url or domain / path are required. Optional.
|
- `url` ?<[string]> Either url or domain / path are required. Optional.
|
||||||
- `domain` ?<[string]> either url or domain / path are required Optional.
|
- `domain` ?<[string]> For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url or domain / path are required. Optional.
|
||||||
- `path` ?<[string]> either url or domain / path are required Optional.
|
- `path` ?<[string]> Either url or domain / path are required Optional.
|
||||||
- `expires` ?<[float]> Unix time in seconds. Optional.
|
- `expires` ?<[float]> Unix time in seconds. Optional.
|
||||||
- `httpOnly` ?<[boolean]> Optional.
|
- `httpOnly` ?<[boolean]> Optional.
|
||||||
- `secure` ?<[boolean]> Optional.
|
- `secure` ?<[boolean]> Optional.
|
||||||
- `sameSite` ?<[SameSiteAttribute]<"Strict"|"Lax"|"None">> Optional.
|
- `sameSite` ?<[SameSiteAttribute]<"Strict"|"Lax"|"None">> Optional.
|
||||||
|
|
||||||
Adds cookies to the browser context.
|
|
||||||
|
|
||||||
For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com".
|
|
||||||
|
|
||||||
## async method: BrowserContext.addInitScript
|
## async method: BrowserContext.addInitScript
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
|
|
||||||
|
|
|
||||||
11
packages/playwright-core/types/types.d.ts
vendored
11
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -8286,9 +8286,7 @@ export interface BrowserContext {
|
||||||
* await browserContext.addCookies([cookieObject1, cookieObject2]);
|
* await browserContext.addCookies([cookieObject1, cookieObject2]);
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param cookies Adds cookies to the browser context.
|
* @param cookies
|
||||||
*
|
|
||||||
* For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com".
|
|
||||||
*/
|
*/
|
||||||
addCookies(cookies: ReadonlyArray<{
|
addCookies(cookies: ReadonlyArray<{
|
||||||
name: string;
|
name: string;
|
||||||
|
|
@ -8296,17 +8294,18 @@ export interface BrowserContext {
|
||||||
value: string;
|
value: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* either url or domain / path are required. Optional.
|
* Either url or domain / path are required. Optional.
|
||||||
*/
|
*/
|
||||||
url?: string;
|
url?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* either url or domain / path are required Optional.
|
* For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url
|
||||||
|
* or domain / path are required. Optional.
|
||||||
*/
|
*/
|
||||||
domain?: string;
|
domain?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* either url or domain / path are required Optional.
|
* Either url or domain / path are required Optional.
|
||||||
*/
|
*/
|
||||||
path?: string;
|
path?: string;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue