GoogleChrome / GoogleChrome/lighthouse

CLI flag to choose whether to open a new lighthouse page or not

Open
#16,259 11 comments 0 reactions 0 assignees View on GitHub
feature P2
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 20h
Merged PRs (30d)
19

Description

**Feature request summary**

A CLI flag (something like `--reuse-page`) to re-use the existing page that was running on the browser that puppeteer connects to.
The page can be selected from `await lhBrowser.pages()`.

**Are you willing to work on this yourself?**
Yes

**What is the motivation or use case for changing this?**
It will help run lighthouse programmatically inside applications like CEF and Electron where opening a new page (by default) causes a failure when connecting to it through remote debugging port.

**How is this beneficial to Lighthouse?**
It will widen the audience to which lighthouse can be used and increase the tool's users.

Mentioned the changes in the screenshot:
![lh module changes](https://github.com/user-attachments/assets/bb4ecd9c-6a04-4d20-9b7d-a578c4a57e2b)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.