add screenshots to logs directory upon failure

pull/21833/head
Bruno Windels 2019-04-09 17:43:34 +02:00
parent 6958fdb6e1
commit f55a448739
1 changed files with 1 additions and 0 deletions

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