From a1f4cb8b430050ee72795e03040a5917fd53759c Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Wed, 5 Feb 2025 15:07:47 +0100 Subject: [PATCH] more docs --- docs/src/api/class-apirequest.md | 2 ++ docs/src/api/class-apirequestcontext.md | 2 ++ docs/src/api/params.md | 2 ++ packages/playwright-core/types/types.d.ts | 40 +++++++++++++++++++++++ 4 files changed, 46 insertions(+) diff --git a/docs/src/api/class-apirequest.md b/docs/src/api/class-apirequest.md index 19e884d9f5..feea5b8378 100644 --- a/docs/src/api/class-apirequest.md +++ b/docs/src/api/class-apirequest.md @@ -80,7 +80,9 @@ Methods like [`method: APIRequestContext.get`] take the base URL into considerat - `multiEntry` <[boolean]> - `records` <[Array]<[Object]>> - `key` ?<[Object]> + - `keyEncoded` ?<[Object]> if `key` is not JSON-serializable, this contains an encoded version that preserves types. - `value` <[Object]> + - `valueEncoded` ?<[Object]> if `value` is not JSON-serializable, this contains an encoded version that preserves types. Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via [`method: BrowserContext.storageState`] or [`method: APIRequestContext.storageState`]. Either a path to the diff --git a/docs/src/api/class-apirequestcontext.md b/docs/src/api/class-apirequestcontext.md index 3cbc9c09cf..b8c179de4f 100644 --- a/docs/src/api/class-apirequestcontext.md +++ b/docs/src/api/class-apirequestcontext.md @@ -896,7 +896,9 @@ context cookies from the response. The method will automatically follow redirect - `multiEntry` <[boolean]> - `records` <[Array]<[Object]>> - `key` ?<[Object]> + - `keyEncoded` ?<[Object]> if `key` is not JSON-serializable, this contains an encoded version that preserves types. - `value` <[Object]> + - `valueEncoded` ?<[Object]> if `value` is not JSON-serializable, this contains an encoded version that preserves types. Returns storage state for this request context, contains current cookies and local storage snapshot if it was passed to the constructor. diff --git a/docs/src/api/params.md b/docs/src/api/params.md index 9fe3d1b53a..f2d8734336 100644 --- a/docs/src/api/params.md +++ b/docs/src/api/params.md @@ -280,7 +280,9 @@ Specify environment variables that will be visible to the browser. Defaults to ` - `multiEntry` <[boolean]> - `records` <[Array]<[Object]>> - `key` ?<[Object]> + - `keyEncoded` ?<[Object]> if `key` is not JSON-serializable, this contains an encoded version that preserves types. - `value` <[Object]> + - `valueEncoded` ?<[Object]> if `value` is not JSON-serializable, this contains an encoded version that preserves types. Learn more about [storage state and auth](../auth.md). diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 196f211e20..6f7c35e361 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -10157,7 +10157,17 @@ export interface Browser { records: Array<{ key?: Object; + /** + * if `key` is not JSON-serializable, this contains an encoded version that preserves types. + */ + keyEncoded?: Object; + value: Object; + + /** + * if `value` is not JSON-serializable, this contains an encoded version that preserves types. + */ + valueEncoded?: Object; }>; }>; }>; @@ -17735,7 +17745,17 @@ export interface APIRequest { records: Array<{ key?: Object; + /** + * if `key` is not JSON-serializable, this contains an encoded version that preserves types. + */ + keyEncoded?: Object; + value: Object; + + /** + * if `value` is not JSON-serializable, this contains an encoded version that preserves types. + */ + valueEncoded?: Object; }>; }>; }>; @@ -18578,7 +18598,17 @@ export interface APIRequestContext { records: Array<{ key?: Object; + /** + * if `key` is not JSON-serializable, this contains an encoded version that preserves types. + */ + keyEncoded?: Object; + value: Object; + + /** + * if `value` is not JSON-serializable, this contains an encoded version that preserves types. + */ + valueEncoded?: Object; }>; }>; }>; @@ -22464,7 +22494,17 @@ export interface BrowserContextOptions { records: Array<{ key?: Object; + /** + * if `key` is not JSON-serializable, this contains an encoded version that preserves types. + */ + keyEncoded?: Object; + value: Object; + + /** + * if `value` is not JSON-serializable, this contains an encoded version that preserves types. + */ + valueEncoded?: Object; }>; }>; }>;