DEV Community

nixcodes
nixcodes

Posted on

aa

Puppeteer and the Lighthouse API (you can see the complete code here).

var s = "JavaScript syntax highlighting";
alert(s);
Enter fullscreen mode Exit fullscreen mode
s = "Python syntax highlighting"
print s
Enter fullscreen mode Exit fullscreen mode
No language indicated, so no syntax highlighting. 
But let's throw in a <b>tag</b>.
Enter fullscreen mode Exit fullscreen mode

async function captureReport() {
// Puppeteer initialization
const browser = await puppeteer.launch();
const page = await browser.newPage();

// Start user flow
const flow = await lighthouse.startFlow(page, { name: 'My User Flow' });

// ... Caputure reports here ...

// End user flow
return flow.generateReport();
}
Within

Top comments (0)