From f55a4487391e5eabfdefc0b9b14f5d5302b04dfc Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 17:43:34 +0200 Subject: [PATCH] add screenshots to logs directory upon failure --- start.js | 1 + 1 file changed, 1 insertion(+) diff --git a/start.js b/start.js index 9bd78db4f8..43988095f9 100644 --- a/start.js +++ b/start.js @@ -101,6 +101,7 @@ async function writeLogs(sessions, dir) { fs.writeFileSync(appHtmlName, documentHtml); fs.writeFileSync(networkLogName, session.networkLogs()); fs.writeFileSync(consoleLogName, session.consoleLogs()); + await session.page.screenshot({path: `${userLogDir}/screenshot.png`}); } return logs; }