switching between mobile, desktop and mobile&dekstop
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?
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
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"]
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!