add screenshots to logs directory upon failure

This commit is contained in:
Bruno Windels 2019-04-09 17:43:34 +02:00
parent 6958fdb6e1
commit f55a448739

View file

@ -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;
}