ProtoTest.Web 1.0.1

dotnet add package ProtoTest.Web --version 1.0.1
                    
NuGet\Install-Package ProtoTest.Web -Version 1.0.1
                    
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="ProtoTest.Web" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ProtoTest.Web" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ProtoTest.Web" />
                    
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 ProtoTest.Web --version 1.0.1
                    
#r "nuget: ProtoTest.Web, 1.0.1"
                    
#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 ProtoTest.Web@1.0.1
                    
#: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=ProtoTest.Web&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ProtoTest.Web&version=1.0.1
                    
Install as a Cake Tool

ProtoTest.Web

The backend-neutral web-testing model: semantic locators, page objects, component scoping, flows, named waits, login and page coverage.

dotnet add package ProtoTest.Web

Register a backend — ProtoTest.Web.Playwright or ProtoTest.Web.Selenium — which supplies AddWeb; this package brings the model that both drive.

Quick start

public sealed class ProjectsPage : WebPage
{
    public WebElement Search => Element(By.TestId("search"));
    public ProjectTable Projects => Component<ProjectTable>(By.TestId("projects"));
}

public sealed class ProjectTable : WebTable<ProjectRow>;
public sealed class ProjectRow : WebTableRow;

var page = Proto.Context.Web().Page<ProjectsPage>();
await page.OpenAsync("/projects");
await page.Search.FillAsync("atlas");

var row = page.Projects.RowMatching(By.HasText("atlas"));
await row.Cell("Project").Should.HaveTextAsync("atlas");

What it adds

  • SessionsProto.Context.Web(name?, application?) creates a per-test session lazily; [WebSession(name, Open = …, Application = …)] and [LoginAs<TStrategy>(persona, Session = …)] cover setup and login.
  • ModelWebPage/WebComponent with Element, Component<T>() and Components<T>(); WebTable<TRow> and WebTableRow for tables; every operation carries its scope path.
  • Actions and assertionsClickAsync, FillAsync, CheckAsync, SelectOptionAsync, PressAsync, reads, and element.Should/ShouldNot (BeVisibleAsync, BeEnabledAsync, HaveTextAsync, ContainTextAsync, HaveValueAsync, …).
  • Downloadssession.DownloadAsync(trigger, …) and the WebPage shortcut capture the file a trigger downloads as a WebDownload (file name, guessed media type, bytes, size) and register it as a test attachment named web-{session}-download-{n}-{file}. Playwright only: Selenium fails with WebBackendCapabilityException before the trigger runs, because the WebDriver protocol has no download API.
  • Flows, middleware and waitsFlow<T>()/InteractAsync, AddWebMiddleware<T>(), AddWebWait<TCondition>(timing, …) and WaitUntilAsync.
  • Coverage — a successful navigation records web.page.visited, a passing assertion web.page.verified, and inventory records web.page.available; WebCoverageCollector reports one item per page.
  • Tracingweb.navigate, web.click, web.fill (redacted value), web.press, web.download, assert.web and friends, with web.backend.execute child entries.

Configuration

Session sections under ProtoTest:Web:Sessions:{name}; backend options also bind over the same section.

Key Type Default
Application string session name
BaseUrl absolute URI string ProtoTest:Applications:{application}:BaseUrl
Open string (absolute or relative) [WebSession].Open
DiscoverRoutes bool false

Coverage inventory lives under ProtoTest:Web:Pages with ProtoTest:Web:Pages:Source (auto/next/nuxt/remix/vue/react) and Framework; in-process ASP.NET Core pages come from their own inventory.

One backend per host: resolving zero or more than one IWebBackendFactory throws, and AddWebBackend keeps the first registration. HasText must be composed with And on both backends.

Learn more

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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 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 (2)

Showing the top 2 NuGet packages that depend on ProtoTest.Web:

Package Downloads
ProtoTest.Web.Playwright

Playwright execution backend for ProtoTest.Web.

ProtoTest.Web.Selenium

Selenium execution backend for ProtoTest.Web.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 73 9/20/2026
1.0.0 73 9/20/2026