-
Couldn't load subscription status.
- Fork 11
Description
It would be very useful to be able to run a setup script for each URL in Chrome before lighthouse runs.
For example:
- To log into a secured area
- To set cookies
- Even (and I don't know if this is possible - I've been spoiled by WPT) to change where a domain resolves
How?
I don't know. This issue is really a discussion starter to see if it's something you are interested in adding, and to think about how/if it's feasible.
Using Puppeteer to script interactions seems sensible. I've done some Googling for ideas.
I've seen this project uses chrome-launcher to set up Chrome rather than Puppeteer directly so that could be a complication.
Resources
Running Lighthouse on Authenticated Pages with Puppeteer
[2 ways to] Using Puppeteer with Lighthouse
chrome-launcher README
Connecting Puppeteer to a Chrome-Launcher instance.
chromelauncher_puppeteer.js