From 0d0968076eb58e49877a0041d71e54111beac3d6 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 30 Jan 2023 09:10:22 -0800 Subject: [PATCH] docs: update .net console example comments (#20503) https://github.com/microsoft/playwright-java/issues/1168 --- docs/src/api/class-consolemessage.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/api/class-consolemessage.md b/docs/src/api/class-consolemessage.md index 19b8579fa6..9fb1a9424c 100644 --- a/docs/src/api/class-consolemessage.md +++ b/docs/src/api/class-consolemessage.md @@ -85,17 +85,17 @@ msg.args[1].json_value() # 42 ``` ```csharp -// Listen for all System.out.printlns +// Listen for all console messages and print them to the standard output. page.Console += (_, msg) => Console.WriteLine(msg.Text); -// Listen for all console events and handle errors +// Listen for all console messages and print errors to the standard output. page.Console += (_, msg) => { if ("error".Equals(msg.Type)) Console.WriteLine("Error text: " + msg.Text); }; -// Get the next System.out.println +// Get the next console message var waitForMessageTask = page.WaitForConsoleMessageAsync(); await page.EvaluateAsync("console.log('hello', 42, { foo: 'bar' });"); var message = await waitForMessageTask;