What can TestDriver test with visual assertions?
AI chatbots
- Validate that chatbot responses are displayed correctly.
- Ensure the chatbot interface is accessible and functional.
- See AI Chatbots for an example.
Desktop applications
- Verify that desktop app windows, dialogs, and UI elements render as expected.
- Test cross-platform compatibility for Windows, Mac, and Linux.
- See Using TestDriver with Desktop Apps for an example.
Chrome extensions
- Confirm that the extension UI integrates properly with the browser.
- Validate extension popups, settings, and interactions.
- See Using TestDriver with Chrome Extensions for an example.
PDF generation
- Assert that generated PDFs contain the correct text, images, and formatting.
- Verify that PDFs open and display properly in viewers.
- See PDF Generation for an example.
Spelling & grammar
- Check for spelling and grammar errors in displayed text.
- Validate that text content matches expected language rules.
- See Spell Check for an example.
Auth signup & login
- Ensure OAuth flows display the correct login screens.
- Verify that users are redirected to the correct pages after login.
- See Login for an example.
File system & uploads
- Confirm that file upload dialogs appear and function correctly.
- Validate that uploaded files are processed and displayed as expected.
- See File Upload for an example.
Image content
- Verify that images are displayed correctly and match expected content.
- Test for the presence of specific icons, logos, or visual elements.
Video content
- Assert that videos play correctly and match expected visuals.
- Validate video controls (play, pause, fullscreen) and captions.
OS accessibility features
- Test high-contrast modes, screen readers, and other accessibility features.
- Validate that UI elements are accessible and readable.
Light / Dark mode
- Verify that the application switches between light and dark modes correctly.
- Assert that UI elements are visible and styled appropriately in both modes.
Privacy configuration
- Confirm that privacy settings are displayed and functional.
- Validate that toggles, checkboxes, and options reflect the correct state.
<iframe>
- Test content rendered inside
<iframe>elements. - Validate interactions within embedded frames.
<canvas>
- Verify that canvas elements render graphics, charts, or animations correctly.
- Assert that dynamic content within the canvas matches expectations.
<video>
- Ensure video elements load and play correctly.
- Validate video overlays, subtitles, and playback controls.
How to use visual assertions
Example: Asserting text on the screen
Example: Asserting an image is present
Example: Asserting video playback
Benefits of visual assertions
- Selectorless Testing: No need to rely on brittle selectors or static code.
- Dynamic Adaptation: Tests adapt to UI changes, reducing maintenance.
- Real User Simulation: Validates the application as a user would experience it.
- Cross-Platform Support: Works seamlessly across web, desktop, and mobile environments.
Best Practices for visual assertions
- Use Descriptive Prompts: Provide clear descriptions for elements or behaviors you want to test.
- Combine with Other Commands: Use visual assertions alongside navigation and interaction commands for end-to-end testing.
- Leverage AI Matching: Use AI-powered matching for dynamic or non-deterministic content.
- Test Across Modes: Validate light/dark modes, accessibility features, and privacy settings for comprehensive coverage.
Visual assertions in TestDriver empower you to test a wide range of applications and scenarios with confidence, ensuring your software delivers a seamless user experience.

