Dramaturge 0.0.1

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

Dramaturge

Browser automation for .NET, built on the W3C WebDriver BiDi protocol through the WebDriverBiDi library. One API drives Chrome, Firefox, and Edge, and waits for the page so that your code does not have to.

Pre-release: Dramaturge is at version 0.0.x, and its API may change in any release.

  • Locators find elements by CSS, XPath, text, accessible role and name, label, placeholder, alt text, title, or test ID, chained and filtered, through frames and shadow roots. A locator is a description, looked up again each time it is used.
  • Actions wait until their element is ready: visible, stable, enabled, and not covered by another element, scrolled into view if needed. An element replaced while an action waits is found again.
  • Assertions (Expect) are checked again until they hold or their time runs out, and report what they last saw. They throw ExpectationFailedException, so they work with any test framework.
  • Accessibility snapshots describe a page as assistive technology sees it, in Playwright's aria snapshot format, with refs that turn into locators, and ToMatchAriaSnapshotAsync to assert a page's structure.
  • Pages wait for navigation and load states, and handle dialogs, popups, downloads, screenshots, PDFs, video, routes that answer or change requests, for a page or a whole browser, cookies, and network capture, with HAR files recorded and replayed.
  • Traces record a browser's actions, DOM snapshots, screenshots, console, and network traffic, which Playwright's trace viewer opens.
  • Code generation (RecordCodeAsync, and dramaturge codegen in Dramaturge.Tool) records what a user does in a browser as C#, with locators and assertions.
  • Works on .NET Standard 2.0 and .NET 10, and with native AOT.

Installation

dotnet add package Dramaturge

The Dramaturge.Browsers package, which downloads and launches browsers, comes with it.

Quick Start

using System.Text.RegularExpressions;
using Dramaturge;
using Dramaturge.Browsers;
using static Dramaturge.Assertions;

// Downloads Chrome for Testing on first use. Disposing the group closes the browser.
await using BrowserGroup group = await BrowserGroup.LaunchAsync(BrowserLauncher.Configure(BrowserKind.Chrome).WithHeadlessOption());
Page page = await group.DefaultBrowser.NewPageAsync();
await page.NavigateAsync("https://example.com/login");

// Each action waits until its element is ready: visible, stable, enabled, and not covered.
await page.GetByLabel("User name").FillAsync("ada");
await page.GetByLabel("Password").FillAsync("correct horse battery staple");
await page.GetByRole("button", "Sign in").ClickAsync();

// Each expectation is checked again until it holds, or fails after five seconds saying what it last saw.
await Expect(page).ToHaveUrlAsync(new Regex("/dashboard$"));
await Expect(page.GetByRole("heading", "Welcome, Ada")).ToBeVisibleAsync();

Timeouts, the polling interval, and other settings are in DramaturgeOptions, passed to LaunchAsync. BrowserGroup.ConnectAsync adds Dramaturge to a BiDiDriver you have already connected.

Documentation

The Dramaturge documentation has guides to each part of the API and the API reference.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Dramaturge:

Package Downloads
Dramaturge.MSTest

Base classes for MSTest tests that use Dramaturge: a browser launched once per test assembly, an isolated browser and page for each test, and screenshots of a failed test's pages.

Dramaturge.NUnit

Base classes for NUnit tests that use Dramaturge: a browser launched once per test assembly, an isolated browser and page for each test, and screenshots of a failed test's pages.

Dramaturge.TUnit

Base classes for TUnit tests that use Dramaturge: a browser launched once per test assembly, an isolated browser and page for each test, and screenshots of a failed test's pages.

Dramaturge.Xunit

Base classes for xUnit v3 tests that use Dramaturge: a browser launched once per test assembly, an isolated browser and page for each test, and screenshots of a failed test's pages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1 38 10/8/2026