Nullean.Cdp.Journeys 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nullean.Cdp.Journeys --version 0.1.0
                    
NuGet\Install-Package Nullean.Cdp.Journeys -Version 0.1.0
                    
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="Nullean.Cdp.Journeys" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nullean.Cdp.Journeys" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Nullean.Cdp.Journeys" />
                    
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 Nullean.Cdp.Journeys --version 0.1.0
                    
#r "nuget: Nullean.Cdp.Journeys, 0.1.0"
                    
#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 Nullean.Cdp.Journeys@0.1.0
                    
#: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=Nullean.Cdp.Journeys&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Nullean.Cdp.Journeys&version=0.1.0
                    
Install as a Cake Tool

Nullean.Cdp

A small Chrome DevTools Protocol client for .NET: find and launch Chrome, drive pages with agent-browser style locators, and read the accessibility tree. Native AOT and trim clean, with no dependencies beyond the BCL.

It is the browser underneath synthetic journeys: plain text files written in agent-browser's command language that replay in agent-browser, in dotnet test (with Nullean.Snapshots) and from a command line tool.

# Get started from the landing page
open /
find role link click --name "Get started"
wait main
snapshot -c -s main

Status: early, 0.x. See ROADMAP.md.

Use

await using var browser = await Browser.LaunchAsync();      // headless, temporary profile
await using var context = await browser.NewContextAsync();  // own cookies and storage
var page = await context.NewPageAsync();
await page.GotoAsync("http://localhost:5000/");

Console.Write(await page.SnapshotAsync(new AxSnapshotOptions { Compact = true, Selector = "main" }));
// - main
//   - heading "Fixture shop" [level=1]
//   - textbox "Search"
//   - checkbox "Only in stock" [checked=true]

Locators wait for their element and act like a user:

await page.Label("Search").FillAsync("lamp");
await page.Role("checkbox", "Only in stock").CheckAsync();
await page.Role("button", "Go").ClickAsync();         // waits for any navigation it starts
await page.Text("3 results").WaitAsync();

page.SendAsync(method, params) and browser.Connection reach any CDP command the library does not wrap.

Journeys

Nullean.Cdp.Journeys runs synthetic journeys: text files with one agent-browser command per line.

# checkout.journey
open /shop
find label Search fill lamp
press Enter
wait --text "results"
find role button click --name "Add to basket"
snapshot -c -s main          # a checkpoint: its output is recorded
get text .basket-count       # another
var journey = Journey.Load("journeys/checkout.journey");
var result = await JourneyRunner.RunAsync(journey, browser, new JourneyOptions { BaseUrl = new("http://localhost:5000/") });
foreach (var checkpoint in result.Checkpoints)
    Console.WriteLine($"{checkpoint.Command}\n{checkpoint.Output}");
if (result.Failure is { } failure)
    Console.WriteLine(failure.Describe(result.Source));   // checkout.journey:5: find role button ... and why
  • The commands are agent-browser's, written the same way: navigation, every element action (click, dblclick, hover, focus, fill, type, check, select, upload, drag, scroll, ...), press and keyboard, find (role, text, label, ..., first, last, nth), wait (element, time, text, URL, load state), set (viewport, media, device, geo, offline, headers, credentials), and the checkpoints snapshot, get and is. Left out on purpose: refs, eval, cookies and session state, tabs, screenshots and downloads. Anything unsupported is an error that names the line.
  • No refs. @e3 changes from run to run, so journeys use find role … --name, find text, find label or CSS.
  • Quoting is a shell's: double or single quotes, backslash escapes. # starts a comment, but #id is a selector.
  • URLs: open /shop resolves against the base URL like a link in a page would, so a base URL for a folder needs its trailing slash.
  • Safe to share: a run reaches only the base URL's host and the hosts in the journey's allow lines, on every request including clicks, redirects and popups; file:// stays in the base folder; downloads are denied. Passwords are $env:NAME references, typed when the step runs and redacted from everything the run reports.
  • Replay in agent-browser: journey.ToAgentBrowserBatch(baseUrl) gives the batch JSON, for agent-browser batch --bail. A journey using every supported command runs there unchanged.

The CLI

cdp check journeys/*.journey                             # parse only, every error with its line
cdp run journeys/checkout.journey --base-url http://localhost:5000/
cdp run site/journeys/*.journey --base-url ./site --json
cdp snapshot http://localhost:5000/ --compact            # one page's accessibility tree
cdp batch journeys/checkout.journey --base-url http://localhost:5000/ | agent-browser batch --bail
cdp chrome                                               # which Chrome, or where it looked

Everything the page produced is printed between --- PAGE_CONTENT nonce=… --- markers with a nonce per run, so an agent reading the output can tell the page's words from the tool's. Exit codes: 0 ok, 1 failed, 2 usage, 3 no browser. The command name cdp is a working name.

Finding Chrome

CDP_CHROME, then CHROME_PATH, then the standard install locations for Chrome, Chrome for Testing, Chromium and Edge on each OS, then google-chrome, chromium and chrome on the PATH. When nothing is found, the error lists every place it looked.

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 Nullean.Cdp.Journeys:

Package Downloads
Nullean.Snapshots.Browser

Browser journeys for Nullean.Snapshots: run agent-browser style journeys with Nullean.Cdp and compare their transcripts, accessibility trees and reads, as trees.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.13.0 1,239 11/17/2026
0.12.0 216 11/16/2026
0.11.1 886 11/12/2026
0.11.0 100 11/11/2026
0.10.0 990 11/11/2026
0.9.0 97 11/10/2026
0.8.0 420 11/10/2026
0.7.0 121 11/10/2026
0.6.0 332 11/5/2026
0.5.0 97 11/5/2026
0.4.0 99 11/5/2026
0.3.0 305 11/4/2026
0.2.0 95 11/4/2026
0.1.0 154 11/4/2026