-
I've integrated the custom-audit example in my existing user flow script .In the lighthouse html reports i am not able to see the results for custom-audit. Does LH supports user flow integration with custom-audit? |
Beta Was this translation helpful? Give feedback.
Answered by
adamraine
Jan 17, 2024
Replies: 1 comment 2 replies
-
Yes, I can get it working with the following script (exact file paths will vary for your setup: import puppeteer from 'puppeteer';
import fs from 'fs';
import open from 'open';
import {startFlow} from 'lighthouse';
const browser = await puppeteer.launch({
headless: false,
ignoreDefaultArgs: ['--enable-automation'],
});
const page = await browser.newPage();
const {default: config} = await import('/Users/asraine/lighthouse/docs/recipes/custom-gatherer-puppeteer/custom-config.js');
const flow = await startFlow(page, {config, flags: {configPath: '/Users/asraine/lighthouse/docs/recipes/custom-gatherer-puppeteer/custom-config.js'}});
await flow.navigate('https://example.com');
const report = await flow.generateReport();
fs.writeFileSync('flow.report.html', report);
open('flow.report.html');
await browser.close(); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately that's not currently possible, but that's a good improvement idea for #15254