From 428a5fcebc9e113540486bde481d43aa97febf6f Mon Sep 17 00:00:00 2001 From: othree Date: Mon, 5 Feb 2018 17:30:38 +0800 Subject: [PATCH] Fix the way to use puppeteer console message --- lib/helper/Puppeteer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper/Puppeteer.js b/lib/helper/Puppeteer.js index 2d6891151..ba9822848 100644 --- a/lib/helper/Puppeteer.js +++ b/lib/helper/Puppeteer.js @@ -222,7 +222,7 @@ class Puppeteer extends Helper { this.withinLocator = null; page.on('load', frame => this.context = page.$('body')); page.on('console', (msg) => { - this.debugSection(msg.type, Array.isArray(msg.args) ? msg.args.join(' ') : msg.args); + this.debugSection(msg.type(), msg.args()); consoleLogStore.add(msg); }); });