From 2b1a121133957f1f9b56965f5d436ba7e50f791b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E8=B7=83=E5=85=B5?= Date: Sat, 8 Apr 2023 04:51:46 +0800 Subject: [PATCH] Update class-consolemessage.md (#22261) --- docs/src/api/class-consolemessage.md | 4 ++-- packages/playwright-core/types/types.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/api/class-consolemessage.md b/docs/src/api/class-consolemessage.md index 9fb1a9424c..1a230b24e3 100644 --- a/docs/src/api/class-consolemessage.md +++ b/docs/src/api/class-consolemessage.md @@ -23,8 +23,8 @@ await page.evaluate(() => { const msg = await msgPromise; // Deconstruct console log arguments -await msg.args[0].jsonValue() // hello -await msg.args[1].jsonValue() // 42 +await msg.args()[0].jsonValue() // hello +await msg.args()[1].jsonValue() // 42 ``` ```java diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 2413995ec6..7278c3c0b2 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -16146,8 +16146,8 @@ export interface BrowserServer { * const msg = await msgPromise; * * // Deconstruct console log arguments - * await msg.args[0].jsonValue() // hello - * await msg.args[1].jsonValue() // 42 + * await msg.args()[0].jsonValue() // hello + * await msg.args()[1].jsonValue() // 42 * ``` * */