diff --git a/docs/src/api/class-browsercontext.md b/docs/src/api/class-browsercontext.md index 97c9303225d13..c49bef583269a 100644 --- a/docs/src/api/class-browsercontext.md +++ b/docs/src/api/class-browsercontext.md @@ -327,9 +327,9 @@ await context.AddCookiesAsync(new[] { cookie1, cookie2 }); - `cookies` <[Array]<[Object]>> - `name` <[string]> - `value` <[string]> - - `url` ?<[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. + - `url` ?<[string]> Either `url` or both `domain` and `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 both `domain` and `path` are required. Optional. + - `path` ?<[string]> Either `url` or both `domain` and `path` are required. Optional. - `expires` ?<[float]> Unix time in seconds. Optional. - `httpOnly` ?<[boolean]> Optional. - `secure` ?<[boolean]> Optional. diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts index d4e4f52c74f85..49e9b97efa5fc 100644 --- a/packages/playwright-client/types/types.d.ts +++ b/packages/playwright-client/types/types.d.ts @@ -8802,18 +8802,18 @@ export interface BrowserContext { value: string; /** - * Either url or domain / path are required. Optional. + * Either `url` or both `domain` and `path` are required. Optional. */ url?: 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. + * For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either + * `url` or both `domain` and `path` are required. Optional. */ domain?: string; /** - * Either url or domain / path are required Optional. + * Either `url` or both `domain` and `path` are required. Optional. */ path?: string; diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index d4e4f52c74f85..49e9b97efa5fc 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -8802,18 +8802,18 @@ export interface BrowserContext { value: string; /** - * Either url or domain / path are required. Optional. + * Either `url` or both `domain` and `path` are required. Optional. */ url?: 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. + * For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either + * `url` or both `domain` and `path` are required. Optional. */ domain?: string; /** - * Either url or domain / path are required Optional. + * Either `url` or both `domain` and `path` are required. Optional. */ path?: string;