AI assertion visually checks the page against the expected state.

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 to the sum of the prices of the items)

With Playwright, the assertion is very rigid and gets out of sync with the UI changes. With Stably AI, the assertion is can be high-level and adapts to the UI changes.

Caching

AI assertions generally takes longer to run than other actions. We cache the result of the assertion so that it can run faster on subsequent runs.