---
title: "Perform a browser assertion"
method: POST
path: "/v1/browser/assert"
tags: ["Browser"]
---

# Perform a browser assertion

`POST /v1/browser/assert`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/browser/assert`
- Auth: HTTP bearer

Seven assertion types: visible, hidden, text, url, count, attribute, console.
Polls with configurable timeout. Returns AX snapshot on failure.

## Request body

- object
  - `type` 'visible' | 'hidden' | 'text' | 'url' | 'count' | 'attribute' | 'console', required
  - `selector` string
  - `expected` string
  - `timeout` number: Polling timeout in seconds (default: 5)

## Response `200`

Assertion passed

## Other responses

- `417`: Assertion failed (includes AX snapshot)

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
