Precept.Screenplay
0.11.0
dotnet add package Precept.Screenplay --version 0.11.0
NuGet\Install-Package Precept.Screenplay -Version 0.11.0
<PackageReference Include="Precept.Screenplay" Version="0.11.0" />
<PackageVersion Include="Precept.Screenplay" Version="0.11.0" />
<PackageReference Include="Precept.Screenplay" />
paket add Precept.Screenplay --version 0.11.0
#r "nuget: Precept.Screenplay, 0.11.0"
#:package Precept.Screenplay@0.11.0
#addin nuget:?package=Precept.Screenplay&version=0.11.0
#tool nuget:?package=Precept.Screenplay&version=0.11.0
Precept.Screenplay
The screenplay pattern for Precept. An actor holds the abilities they were granted, performs interactions against targets, and is asked questions about what they can see.
dotnet add package Precept.Screenplay
using Precept.Screenplay;
using Precept.Screenplay.Web;
var alice = await Actor.Named("alice").WhoCanBrowseTheWebAsync();
await alice.AttemptsToAsync(
Navigate.To("/login"),
Enter.The("ada@example.com").Into(SignInPage.Email),
Enter.TheSecret(password).Into(SignInPage.Password),
Click.On(SignInPage.Submit));
await Assert.That(alice.Sees(Dashboard.Greeting)).ToHaveTextAsync("Hello, Ada");
There is nothing to register. An actor is created inside a test and belongs to it. The package
brings Precept.Web with it, which is what the browser interactions run through. A suite that
drives a browser through page objects installs Precept.Web on its own and is offered none of
this.
Screenplay replaces nothing. Page objects and screenplay can share a project, and
actor.Sees(target) returns a Playwright locator, so the assertions are the same ones
Precept.Web already has.
Part of Precept, a .NET 10 test framework built on Microsoft.Testing.Platform. Full documentation: screenplay · interactions · questions and assertions · two users at once · with Gherkin
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.12)
- Microsoft.Extensions.Configuration.Json (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Playwright (>= 1.62.0)
- Precept.Core (>= 0.11.0)
- Precept.Web (>= 0.11.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.