Motus

Browser automation and testing for .NET that talks straight to the browser over CDP and WebDriver BiDi. No Node.js sidecar, no driver binaries, and every built-in feature is a plugin you could have written yourself.

LicenseMIT, developed in public
ProtocolsCDP for Chromium, Chrome, and Edge; WebDriver BiDi for Firefox
BrowsersChrome, Edge, Firefox
Test frameworksMSTest, xUnit, NUnit
Runtime.NET 8, .NET 10
Released1.0 on 2026-03-29

The problem it solves

Browser testing from .NET has meant borrowing someone else's runtime. One popular framework proxies every command through a Node.js process; another routes them through a driver binary per browser. Either way there is a process boundary between your test and the page, a second toolchain to install in CI, and an extension model that was never designed for you.

Motus removes the boundary. Your test process opens a WebSocket to the browser and speaks its native protocol.

What Motus is

A browser automation library, an assertion library with auto-waiting, adapters for MSTest, xUnit, and NUnit, a command-line tool, and an MCP server so an AI agent can drive the same browser your tests do. Source-generated protocol bindings keep it NativeAOT friendly, and Roslyn analyzers flag common automation mistakes at compile time.

using Motus;
using Motus.Testing.MSTest;
using static Motus.Assertions.Expect;

[MotusTestClass]
public class SearchTests : MotusTestBase
{
    [TestMethod]
    public async Task SearchReturnsResults()
    {
        var page = await Context.NewPageAsync();
        await page.GotoAsync("https://example.com");

        await page.Locator("input[name='q']").FillAsync("motus automation");
        await page.Locator("button[type='submit']").ClickAsync();

        await That(page).ToHaveUrlAsync("**/search**");
        await That(page.Locator(".results")).ToBeVisibleAsync();
    }
}

Every built-in selector strategy, lifecycle hook, wait condition, and reporter is registered through the same plugin context a third party uses. There are no internal shortcuts, which is the only way to know the extension surface is good enough.

If the framework's own features are built on the public plugin interfaces, the architecture stays honest.

Compared with

Where Motus sits next to the frameworks .NET teams already use.

MotusPlaywright for .NETSelenium
TransportCDP and WebDriver BiDi over WebSocket, from your processA Node.js driver process that the .NET package launches and talks toThe WebDriver protocol through a driver binary per browser
BrowsersChrome, Edge, FirefoxChromium, Firefox, WebKitChrome, Edge, Firefox, Safari, and others
ExtensibilityEvery built-in is a plugin on public interfacesFixtures and configurationListeners and WebDriver extension points
For agentsMCP server in the boxA separate MCP server projectThird party
Test frameworksMSTest, xUnit, NUnit adaptersMSTest, xUnit, NUnit adaptersAny
LicenseMITApache 2.0Apache 2.0

Where it fits

The Datafication SDK loads and shapes the data, Verso is where you explore it, and Motus proves what you shipped in a real browser. We use it to test Verso's own browser host.

Specifications

DrivingLocators
CSS, text, role, and test-id selectors, shadow DOM piercing, frames, auto-waiting actions, and dialog handling.
ObservingSignals
Network capture and HAR export, tracing, video, screenshots, coverage, accessibility audits, and performance metrics.
AuthoringTools
A recorder that turns a session into a test, code generation, page-object generation, and compile-time analyzers.
AgentsMCP
An MCP server exposes navigation, interaction, snapshots, screenshots, and audits to any MCP client. Attach mode connects to a browser that is already running.

Get Motus

LibraryCore
dotnet add package Motus
Test adapterPick one
dotnet add package Motus.Testing.MSTest (or xUnit, NUnit)
Command lineBrowsers and tools
dotnet tool install --global Motus.Cli