LogoLogo
  • Overview
    • Quickstart
    • FAQ
    • Overview
    • Pricing
    • Comparison
    • Discord
  • Pro Setup
    • Book a Demo
    • 30x30 Promotion
  • Guides
    • Generate a Test Suite
    • Local Agent Setup
    • Prompting
    • Getting an API Key
    • GitHub Actions
      • GitHub Action Setup
      • Prerun Scripts
      • Environment Config
      • Parallel Testing
      • Storing Secrets
      • Optimizing Performance
      • Action Output
      • Examples
        • Test Generation
        • Parallel Testing
        • Importing Tests
        • Desktop Apps
        • Secure Log In
    • Debugging Test Runs
    • Monitoring Performance
  • Reference
    • Test Steps
      • assert
      • exec
      • focus-application
      • hover-image
      • match-image
      • hover-text
      • if
      • press-keys
      • remember
      • run
      • scroll
      • scroll-until-image
      • scroll-until-text
      • type
      • wait
      • wait-for-image
      • wait-for-text
    • Interactive Commands
      • /assert
      • /undo
      • /save
      • /run
      • /generate
    • CLI
      • testdriverai init
      • testdriverai [file]
      • testdriverai run [file]
  • Security & Privacy
    • Agent
    • Action
    • Dashboard
  • FAQ
    • Screen Recording Permissions (Mac Only)
    • Status Page
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Reference
  2. Interactive Commands

/assert

Ensure some criteria is true within your test.

Use the assert to command generate an assertion. This will take a screenshot and use it to identify some criteria that ensures the task was complete.

assert No error message is displayed

This will "assert" that there's no error message, just like a user would see. The generated command will look like this:

- command: assert
  expect: There is no erorr message

When TestDriver runs this test, it will look at the screen and verify that the value of expect is true. If it is not true, the test will fail and exit immediately.

Many asserts can slow down a test. Use async: true to speed things up.

- command: assert
  expect: There is no erorr message
  async: true
PreviousInteractive CommandsNext/undo

Last updated 4 months ago

Was this helpful?