Soenneker.Playwrights.TestEnvironment 4.0.192

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Playwrights.TestEnvironment --version 4.0.192
                    
NuGet\Install-Package Soenneker.Playwrights.TestEnvironment -Version 4.0.192
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Playwrights.TestEnvironment" Version="4.0.192" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Playwrights.TestEnvironment" Version="4.0.192" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Playwrights.TestEnvironment" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Playwrights.TestEnvironment --version 4.0.192
                    
#r "nuget: Soenneker.Playwrights.TestEnvironment, 4.0.192"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Playwrights.TestEnvironment@4.0.192
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Playwrights.TestEnvironment&version=4.0.192
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Playwrights.TestEnvironment&version=4.0.192
                    
Install 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

Soenneker.Playwrights.TestEnvironment

Defines the playwright test environment contract.

Install

dotnet add package Soenneker.Playwrights.TestEnvironment

Quick start

using Soenneker.Playwrights.TestEnvironment.Registrars;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
var result = services.AddPlaywrightTestEnvironmentAsSingleton();

Registers Playwright Test Environment with a singleton lifetime.

What you get

  • IPlaywrightTestEnvironment — Defines the playwright test environment contract.
  • PlaywrightTestEnvironmentRegistrar — A utility library for configuration related operations.
  • PlaywrightSessionOptions — Represents the playwright session options.
  • PlaywrightTestHostOptions — Represents the playwright test host options.
  • PlaywrightTestHostRuntime — Represents the playwright test host runtime.

API at a glance

API What it does Result / important behavior
IPlaywrightTestEnvironment.BaseUrl Gets base url. Gets base url.
IPlaywrightTestEnvironment.Initialize(projectPath, cancellationToken) Initializes the Playwright Test Environment so it is ready for use. A task that completes when the Playwright Test Environment is ready for use.
PlaywrightTestEnvironmentRegistrar.AddPlaywrightTestEnvironmentAsSingleton(services) Registers Playwright Test Environment with a singleton lifetime. The same service collection, so additional registrations can be chained.
PlaywrightTestEnvironmentRegistrar.AddPlaywrightTestEnvironmentAsScoped(services) Registers Playwright Test Environment with a scoped lifetime. The same service collection, so additional registrations can be chained.
PlaywrightSessionOptions.ReuseBrowserContextAcrossSessions Gets or sets a value indicating whether reuse browser context across sessions. Gets or sets a value indicating whether reuse browser context across sessions.
PlaywrightSessionOptions.ReusePageAcrossSessions Gets or sets a value indicating whether reuse page across sessions. Gets or sets a value indicating whether reuse page across sessions.
PlaywrightTestHostOptions.SolutionFileName Gets or sets solution file name. Gets or sets solution file name.
PlaywrightTestHostOptions.ProjectRelativePath Gets or sets project relative path. Gets or sets project relative path.
PlaywrightTestHostOptions.ApplicationName Gets or sets application name. Gets or sets application name.
PlaywrightTestHostOptions.Restore Gets or sets a value indicating whether restore. Gets or sets a value indicating whether restore.
PlaywrightTestHostOptions.Build Gets or sets a value indicating whether build. Gets or sets a value indicating whether build.
PlaywrightTestHostOptions.BuildConfiguration Gets or sets build configuration. Gets or sets build configuration.
PlaywrightTestHostOptions.ReuseBrowserContextAcrossSessions Gets or sets a value indicating whether reuse browser context across sessions. Gets or sets a value indicating whether reuse browser context across sessions.
PlaywrightTestHostOptions.ReusePageAcrossSessions Gets or sets a value indicating whether reuse page across sessions. Gets or sets a value indicating whether reuse page across sessions.
PlaywrightTestHostRuntime.BaseUrl Gets or sets base url. Gets or sets base url.
PlaywrightTestHostRuntime.Playwright Gets or sets playwright. Gets or sets playwright.
PlaywrightTestHostRuntime.Browser Gets or sets browser. Gets or sets browser.
PlaywrightTestHostRuntime.SharedContext Gets or sets shared context. Gets or sets shared context.

Practical notes

  • Cancellation stops pending work; it does not undo work that has already completed.
  • Dispose instances you own when their scope ends so held resources can be released.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Playwrights.TestEnvironment:

Package Downloads
Soenneker.Playwrights.TestHosts

A test host for automated testing with Playwright

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.194 0 8/30/2026
4.0.193 0 8/30/2026
4.0.192 26 8/30/2026
4.0.191 43 8/30/2026
4.0.190 36 8/29/2026
4.0.189 41 8/29/2026
4.0.188 38 8/29/2026
4.0.187 157 8/26/2026
4.0.186 84 8/26/2026
4.0.185 65 8/26/2026
4.0.184 86 8/26/2026
4.0.183 99 8/26/2026
4.0.182 157 8/22/2026
4.0.181 105 8/22/2026
4.0.180 80 8/22/2026
4.0.179 100 8/22/2026
4.0.178 88 8/22/2026
4.0.177 99 8/21/2026
4.0.176 117 8/21/2026
4.0.175 198 8/19/2026
Loading failed