I am automating the lighthouse report in chrome browser.
But the URL I want to test is behind the authentication. so when I run the task it generates the lighthouse report for authentication page. How can I test the actual URL?
gulp.task("lighthouse", function () {
return launchChromeAndRunLighthouse('http://localhost:8080/Template/GetTemplate?templateName=IndexDev', flags).then(results => {
// console.log(results);
write(results, 'html', 'report.html')
});
});
function launchChromeAndRunLighthouse(url, flags) {
return chromeLauncher.launch().then(chrome => {
flags.port = chrome.port;
return lighthouse(url, flags).then();
});
}