Nullean.Cdp.Cli
0.11.1
dotnet tool install --global Nullean.Cdp.Cli --version 0.11.1
dotnet new tool-manifest
dotnet tool install --local Nullean.Cdp.Cli --version 0.11.1
#tool dotnet:?package=Nullean.Cdp.Cli&version=0.11.1
nuke :add-package Nullean.Cdp.Cli --version 0.11.1
Nullean.Cdp.Cli

The cdp command: check and run synthetic journeys against Chrome over the DevTools Protocol, export them to
agent-browser, and snapshot pages. Native AOT.

Install
dotnet tool install -g Nullean.Cdp.Cli
Quick start
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.
A journey is a text file 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
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.
Learn more
- Documentation: https://cdp.nullean.net/cli/, and journeys
- Run journeys from .NET instead: Nullean.Cdp.Journeys
- Source and issues: https://github.com/nullean/cdp
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.