I want to use Google lighthouse to analyze web apps and web pages.
If UiPath has some similar feature would love to use that instead of Google lighthouse.
Otherwise need guidance how to automate usage of Google lighthouse.
Hey @mayur.pawanikar
Could you please explain what do you want to perform with it.
It will be better to understand more and provide a better Suggestion.
Thanks
#nK
There is client website, which has a lot of traffic. We want ensure that the website is up and running and response time is excellent. Currently, client is using Google lighthouse to generate reports regarding how the website is working. We now need to automate this process and generate similar reports with UiPath.
Hey @mayur.pawanikar
First thing, Thanks for posting this here. This was a pretty good and modern use case.
Google has Lighthouse libraries which can be installed and utilized for programmatic executions.
So we are going to use the node library for lighthouse to fulfill your requirement,
Pre-requisite Setup
-
Install Node JS LTS if its not present already
-
Then you need to install the
Lighthouse
node library
npm install -g lighthouse
npm : Node Package Manager
install : command to install
-g : Global flag mentioning the package will be used globally which is important for us
lighthouse : Is the package name to be installed
- Now its time to run the lighthouse command for generating a website’s performance report
CMD → Run below command
"lighthouse https://nmnithinkrishna.me/ --view --quiet --chrome-flags='--headless'"
We are also using some flags to support us,
-
–view : Open the report after it gets generated
-
–quiet : Ignoring console logs
-
–chrome-flags=‘–headless’ : We don’t want chrome to be opened visibly while it analyses a website and generates report
There are lot of variations and options you can use for the above. Please use below command for docs/help which explains all the options available.
lighthouse --help
Now integrating the above approach in UiPath
Just use Start Process & Trigger the CMD with the appropriate command & flags
PFA - nmnithinkrishna_GoogleLightHouseIntegrationCMD.zip (1.9 KB)
Kindly note, the output of lighthouse can also be fetched as JSON. By default it will be HTML.
Ref - Lighthouse overview - Chrome for Developers
Hope this helps.
Thanks
#nK
Thank you so much Nithinkrishna !
I will quickly try this and get back to you in case of any further queries.