Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: Enhance `docs/src/api/class-browsercontext.md` (#37680)

stefanseegereee0d95b6c52
diff --git a/docs/src/api/class-browsercontext.md b/docs/src/api/class-browsercontext.md
index 97c9303225..c49bef5832 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 ad72bca33d..c510663fcc 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 ad72bca33d..c510663fcc 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;