Precept 0.10.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 are carried out through — a suite that drives a browser through page objects installs that one on its own and is offered none of this.

It replaces nothing. Page objects and screenplay can share a project, and actor.Sees(target) hands back a Playwright locator, so the assertions are the same ones Precept.Web already has.


Part of Precept, a .NET 10 test automation framework. Full documentation: screenplay · interactions · questions and assertions · two users at once · with Gherkin

Precept 0.10.0 · MIT · © 2026

Esc