Use lighthouse in selenium automation testing
Вставка
- Опубліковано 15 жов 2024
- In this comprehensive tutorial, we will walk you through the process of integrating Lighthouse into your Selenium automation testing workflow to assess web performance metrics. Lighthouse, a powerful open-source tool from Google, will help you analyze your website's speed, accessibility, best practices, SEO, and more, all in a single, user-friendly HTML report.
Hi ADM Lucid. I was searching for the google lighthouse automation project and see where I landed. This is a better and more understandable than what I have created using Sikuli and AutoIT robotic classes with the help of selenium Webdriver. The way you have coded and explained it is very neat and understandable. Where can I find this code so that I can implement it to get the best performance-matrix. Thank you so much.
Hi,
I'm glad you found this video helpful. Unfortunately, we have not yet put the code on our website yet. However, we are working our hardest to do that. You may find the code at this URL: admlucid.com/Home/SeleniumSBS or GitHub in the future!
Thanks!
Hi @@testautomation999 , the command used for this is working fine for un-authenticated / un-authorized site. What is the solution for the site which requires authorization, so in this scenario what should be the approach. From the blog I understood that we need to use the cookies or authorization code, but how to fetch and used them is what I'm looking for. Could you create a video on this. I hope there are many others awaiting for this approach. Many thanks :)
Thank you for comments. Yes, the video only shows for un-authenticated / un-authorized web pages.
Hi.. Without opening new tab can we perform the Lighthouse performance in opened window.?
We did not try to open only a tab to perform lighthouse, but we can do lighthouse without launching browser , adding --chrome-flags="--headless" after lighthouse URL . lighthouse URL --chrome-flags="--headless". Thanks.
>lighthouse --help
throws - 'lighthouse' is not recognized as an internal or external command, operable program or batch file.
- Tried in new command prompt windows also.
- In node_modules folder we can see the lighthouse folder. How to get this work?
Looks like PATH issue. I will fix it.
how to skip login ?
It did not really skip login, gave URL after login with token. Thanks.