mercredi 27 janvier 2021

Allure attachment generate .null file format instead .txt

Below fuction is generating a .null file format in allure report as attachment to test results (it's a browser console errors report), but I want to get a .txt. Is there a way to fix that?

this.getConsoleErrors = async function() {
    var consoleErrors;
    await browser.manage().logs().get('browser').then(function(browserLog) {
        return consoleErrors = require('util').inspect(browserLog);
    });
    await allure.createAttachment('Console logs', function() {return consoleErrors}, 'logs/txt')();
}

Aucun commentaire:

Enregistrer un commentaire