LighthousePlaywright.Net
1.0.0
See the version list below for details.
dotnet add package LighthousePlaywright.Net --version 1.0.0
NuGet\Install-Package LighthousePlaywright.Net -Version 1.0.0
<PackageReference Include="LighthousePlaywright.Net" Version="1.0.0" />
<PackageVersion Include="LighthousePlaywright.Net" Version="1.0.0" />
<PackageReference Include="LighthousePlaywright.Net" />
paket add LighthousePlaywright.Net --version 1.0.0
#r "nuget: LighthousePlaywright.Net, 1.0.0"
#:package LighthousePlaywright.Net@1.0.0
#addin nuget:?package=LighthousePlaywright.Net&version=1.0.0
#tool nuget:?package=LighthousePlaywright.Net&version=1.0.0
LighthousePlaywright.Net
This is a .NET (c#) library for Google Lighthouse tool.
Lighthouse is a tool developed by Google that analyzes web apps and web pages, collecting modern performance metrics and insights on developer best practices.
Playwright is a Node library to automate Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is ever-green, capable, reliable and fast.
Project based on https://github.com/dima-horror/lighthouse.net but instead of the need for an installed version of chrome it uses playwright.
How to install
You need to install lighthouse and playwright-lighthouse as Node module on machine (more info).
- Install the current version of Node.
- Install Lighthouse and playwright-lighthouse. The
-g
flag installs it as a global modules.
> npm install -g lighthouse playwright-lighthouse
- Install lighthouse.net into your project via NuGet
PM> Install-Package LighthousePlaywright.Net
Basic example
public class LighthouseTest
{
[Fact]
public async Task ExampleComAudit()
{
var lh = new Lighthouse();
var res = await lh.Run("http://example.com");
res.Should().NotBeNull();
res.Performance.Should().NotBeNull();
(res.Performance > 0.5m).Should().BeTrue();
res.Accessibility.Should().NotBeNull();
(res.Accessibility > 0.5m).Should().BeTrue();
res.BestPractices.Should().NotBeNull();
(res.BestPractices > 0.5m).Should().BeTrue();
res.Seo.Should().NotBeNull();
(res.Seo > 0.2m).Should().BeTrue();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.