Allow Lighthouse to audit a webpage inside already opened tab (browser context) #12024
-
The idea: the lighthouse can gather audit metrics on the already opened tab within running browser context. Why one might need this? The lighthouse may be used as a part ot UI testing, we may implement UI auto-test using browser automation libraries (Puppeteer, Playwright, webdriver/Selenium) to automate user-browser interactions, then we can use lighthouse to audit UI performance (e.g. use Puppeteer to login into the webapp, use lighthouse to measure a performance of the page after login). Implementation (fast and dirty): The lighthouse-core can connect to the running instance of Chrome:
The problem is it opens a new tab. It happens inside run() method of GatherRunner
Subsequently,
And, finally,
I suggest to allow user to pass a runing browser debugPort and devTools pageId. This wiil be passed to
Additionally, we need to disable 'driver.disconnect()' if 'CUSTOM_PARAM As far as i tried, it works for auditing (but now for PWA metrics, probably, driver goes offline and we need to enable online back after auditing). The question is do you like me to create a PR, or this is against core team view / the same alredy exists, but I missed it (not sure if the same can be achieved via |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
We're working on supporting auditing user flows. See #11313 |
Beta Was this translation helpful? Give feedback.
We're working on supporting auditing user flows. See #11313