From 797b561013bc3f4212fa90a2e044f97b7c30b5e6 Mon Sep 17 00:00:00 2001 From: Artem Sapegin Date: Tue, 23 Jan 2018 01:10:31 +0100 Subject: [PATCH] docs(README): Update debugging tips (#1868) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 184faf79..9afabdbb 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ Explore the [API documentation](docs/api.md) and [examples](https://github.com/G 1. Capture console output - You can listen for the `console` event. This is also handy when debugging code in `page.evaluate()`: - page.on('console', msg => console.log('PAGE LOG:', ...msg.args)); + page.on('console', msg => console.log('PAGE LOG:', msg.text())); await page.evaluate(() => console.log(`url is ${location.href}`));