Skip to main content

Native Validation Messages Not Captured in Firefox Screenshots

Written by Ines
Updated this week

Overview

When running automated tests in Firefox, native HTML form validation tooltips (e.g., "Value must be greater than or equal to X" for ) are not captured in test run screenshots. This is a known Playwright limitation, not a bug in Thunders.


Why Does This Happen?

Thunders uses Playwright's Page.ScreenshotAsync() to capture screenshots during test execution. This method captures only the web content area of the page.

  • In Firefox, native form validation tooltips are rendered by the browser's native OS UI toolkit, outside the web content area. Playwright cannot capture them.

  • In Chromium-based browsers (Chrome, Edge), these same tooltips are rendered inside the page's Shadow DOM, so they appear in screenshots normally.


What This Means for You

  • Validation messages are still displayed to real users in the browser, the limitation only affects automated test screenshots.

  • Test reliability is not compromised. The underlying validation logic works the same across all browsers; only the screenshot evidence differs.

  • If you see a test step that checks for a native validation message and the screenshot appears to be missing it, this is expected behavior in Firefox.


Recommended Workarounds

  • Execute on a different browser: Run the test in a browser where native validation tooltips render inside the web content and are captured in screenshots (e.g., Chrome, Edge, or Safari).


Report a Compatibility Issue

If you encounter other browser-specific rendering differences that affect your test results, please reach out:

  • In-app chat: Look for the small icon in the bottom-right corner of the page.

Did this answer your question?