> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stably.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Assertion

> Stably's AI assertion visually checks pages against expected states with intelligent visual and semantic understanding for reliable test validation.

<Note>
  This documentation is for **Stably Classic**. For the new Stably Web Editor, see [AI Assertions](/stably-sdk/ai-assertions).
</Note>

Stably's AI assertion visually checks the page against the expected state.

<Frame type="glass">
  <img src="https://mintcdn.com/stablyai/gQcjGEzeMU3Scby6/images/ai-visual-assertion/ai-visual-assertion.png?fit=max&auto=format&n=gQcjGEzeMU3Scby6&q=85&s=36897a1beaf0e0082da65fccf1aa8507" width="559" height="315" data-path="images/ai-visual-assertion/ai-visual-assertion.png" />
</Frame>

<iframe
  src="https://www.loom.com/embed/4666ba40ab21402cae5970f779442246?sid=6926ce77-3e7f-4ee0-9346-6e904ece119c"
  style={{
width: '100%',
aspectRatio: '16/9',
border: 'none',
borderRadius: '8px'
}}
/>

## What kind of assertions can I make?

You can make assertions on the following:

* Text content (e.g. the text of a button)
* Visual content (e.g. an image that has a certain theme, or a button that has a certain color)
* Presence of an element (e.g. a button that should be present on the page)
* Calculated values (e.g. the total price of items in a cart equals the sum of the prices of the items)

With Playwright, assertions can be rigid and get out of sync with UI changes. With Stably AI, assertions can be high-level and adapt as the UI changes.
