Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switching between mobile, desktop and mobile&dekstop #78

Open
andreimihale opened this issue Jun 13, 2022 · 3 comments
Open

switching between mobile, desktop and mobile&dekstop #78

andreimihale opened this issue Jun 13, 2022 · 3 comments

Comments

@andreimihale
Copy link

As i can see, the default lighthouse check is mobile. Is there any possibility to change the test between mobile, desktop or do checks for both mobile and desktop?

@Dhindmarsh
Copy link

In case some one else is looking for this as well, I know I was. You can change the configuration of the Lighthouse run using the --params flag and Lighthouse's parameters.

For example to run a batch of desktop tests you can use Lighthouse's desktop preset:

lighthouse-batch -s <url1,url2> --params "--preset desktop"

The Lighthouse docs have more information on the various parameters you can use: Lighthouse Documentation

If you need/want even more control you can use a config file: Lighthouse Configuration

@iftimiedaniel
Copy link

iftimiedaniel commented May 31, 2023

In case some one else is looking for this as well, I know I was. You can change the configuration of the Lighthouse run using the --params flag and Lighthouse's parameters.

For example to run a batch of desktop tests you can use Lighthouse's desktop preset:

lighthouse-batch -s <url1,url2> --params "--preset desktop"

The Lighthouse docs have more information on the various parameters you can use: Lighthouse Documentation

If you need/want even more control you can use a config file: Lighthouse Configuration

The --preset desktop is invalid argument.
Invalid values: Argument: preset, Given: "", Choices: "perf", "experimental", "desktop"

Try to add = like this:
lighthouse-batch -s <url1,url2> --params "--preset=desktop"
Check documentation here: https://github.com/GoogleChrome/lighthouse#cli-options
For desktop, --preset=desktop instead. [string] [choices: "mobile", "desktop"]

@tiansengkear
Copy link

Hi there,

In case anyone doesn't get it working using above solution, I have tested using Lighthouse v11.0.0 using the following comment and it works for me.

npx lighthouse-batch -s <url1,url2> -h -p "--config-path=node_modules/lighthouse/core/config/lr-desktop-config.js"

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants