![]() |
VOOZH | about |
dotnet add package Soenneker.Playwrights.Installation --version 4.0.61
NuGet\Install-Package Soenneker.Playwrights.Installation -Version 4.0.61
<PackageReference Include="Soenneker.Playwrights.Installation" Version="4.0.61" />
<PackageVersion Include="Soenneker.Playwrights.Installation" Version="4.0.61" />Directory.Packages.props
<PackageReference Include="Soenneker.Playwrights.Installation" />Project file
paket add Soenneker.Playwrights.Installation --version 4.0.61
#r "nuget: Soenneker.Playwrights.Installation, 4.0.61"
#:package Soenneker.Playwrights.Installation@4.0.61
#addin nuget:?package=Soenneker.Playwrights.Installation&version=4.0.61Install as a Cake Addin
#tool nuget:?package=Soenneker.Playwrights.Installation&version=4.0.61Install as a Cake Tool
👁 alternate text is missing from this package README image
👁 alternate text is missing from this package README image
👁 alternate text is missing from this package README image
👁 alternate text is missing from this package README image
Makes sure Playwright’s browser (e.g. Chromium) is installed before you use it. It runs the install once, sets the browser path, and you’re done.
You might also be interested in:
1. Install the package
dotnet add package Soenneker.Playwrights.Installation
2. Register the util (e.g. in Program.cs or your service setup)
using Soenneker.Playwrights.Installation.Registrars;
services.AddPlaywrightInstallationUtilAsSingleton();
3. Before using Playwright, ensure it’s installed
using Soenneker.Playwrights.Installation.Abstract;
var playwrightUtil = serviceProvider.GetRequiredService<IPlaywrightInstallationUtil>();
await playwrightUtil.EnsureInstalled();
// Now use Playwright as usual.
The first call to EnsureInstalled() installs the browser if needed. Later calls do nothing. You only need to call it once per process.
By default the util installs Chromium with --no-shell and --with-deps. To change that, call SetOptions before the first EnsureInstalled():
using Soenneker.Playwrights.Installation.Abstract;
using Soenneker.Playwrights.Installation.Options;
playwrightUtil.SetOptions(new PlaywrightInstallationOptions
{
NoShell = true, // default: true
WithDeps = true, // default: true
Browser = "chromium", // or "firefox", "webkit"
BrowsersPath = null // optional custom folder for browsers
});
await playwrightUtil.EnsureInstalled();
--no-shell to the install command.--with-deps (install system dependencies).chromium, firefox, or webkit.PLAYWRIGHT_BROWSERS_PATH is set to this path. If null, a default path is used (see below).If you don’t set BrowsersPath, the util uses a default directory. You can get that path with:
string path = playwrightUtil.GetPlaywrightPath();
On Azure App Service it uses a path under the app root. Elsewhere it uses a .playwright folder under your app’s base directory.
You can drive the same options from configuration so you don’t have to call SetOptions in code. If the Playwright config section exists, the util uses it when you haven’t called SetOptions.
appsettings.json
{
"Playwright": {
"NoShell": true,
"WithDeps": true,
"Browser": "chromium",
"BrowsersPath": null
}
}
Environment variables (use double underscore for the section name)
Playwright__NoShellPlaywright__WithDepsPlaywright__BrowserPlaywright__BrowsersPathAnything you set via SetOptions overrides config. If you never call SetOptions and there’s no Playwright section, the defaults (Chromium, no-shell, with-deps, default path) are used.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 3 NuGet packages that depend on Soenneker.Playwrights.Installation:
| Package | Downloads |
|---|---|
|
Soenneker.Cloudflare.Downloader
Allows for navigating and downloading from Cloudflare sites in under-attack mode |
|
|
Soenneker.Playwrights.Crawler
A configurable Playwright crawler with rich stealth and control options. |
|
|
Soenneker.Playwrights.TestEnvironment
A test environment for testing with Playwright |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.61 | 0 | 6/19/2026 |
| 4.0.59 | 22 | 6/18/2026 |
| 4.0.58 | 165 | 6/17/2026 |
| 4.0.57 | 73 | 6/17/2026 |
| 4.0.56 | 303 | 6/17/2026 |
| 4.0.55 | 45 | 6/16/2026 |
| 4.0.54 | 1,105 | 6/11/2026 |
| 4.0.53 | 156 | 6/10/2026 |
| 4.0.51 | 301 | 6/10/2026 |
| 4.0.50 | 264 | 6/10/2026 |
| 4.0.49 | 506 | 6/9/2026 |
| 4.0.48 | 265 | 6/9/2026 |
| 4.0.47 | 538 | 6/9/2026 |
| 4.0.46 | 445 | 6/8/2026 |
| 4.0.45 | 326 | 6/7/2026 |
| 4.0.44 | 169 | 6/7/2026 |
| 4.0.43 | 247 | 6/6/2026 |
| 4.0.42 | 99 | 6/6/2026 |
| 4.0.41 | 107 | 6/6/2026 |
| 4.0.39 | 113 | 6/6/2026 |
Update dependency Soenneker.Extensions.Configuration to 4.0.834 (#133)
Automatically merged