Playwright's assertThat(locator) polls automatically (up to defaultTimeout). Collect all failures before reporting — critical for form validation tests: Update
The Assertions skill leverages Playwright’s assertThat(locator) method to perform reliable, automatic polling of UI elements and API responses, reducing flaky test results by retrying until conditions are met or a timeout occurs. It supports checks on page URLs, titles, element visibility, text content, HTTP response status and headers, and even full or partial screenshots for visual regression. Soft assertions collect multiple failures before halting tests, which is essential for validating complex forms or multi-field pages without stopping at the first error.
This skill is aimed at performance marketers and growth leads responsible for end-to-end conversion rate optimization (CRO) testing, SEO/PPC operators validating landing page integrity, and agency strategists managing cross-channel QA workflows. It suits scenarios where automated verification of user journeys, form validations, or API health checks are critical to maintaining smooth, measurable campaign experiences. Anyone needing to reduce flaky tests and capture comprehensive failure data during validation will benefit.
A typical workflow begins by selecting key page elements or API endpoints to assert against expected states, such as URL patterns, visible text, or response codes. Next, practitioners configure assertions with optional custom timeouts to handle dynamic content load times. They often combine multiple assertions into soft assertion groups to collect all issues in one pass, enabling thorough form validation or multi-step funnel checks. Finally, visual testing compares current screenshots to golden images, flagging any unexpected UI shifts that could impact user experience or conversion.
How does assertThat reduce flaky tests? It automatically retries the assertion until the condition is met or a timeout expires, avoiding brittle fixed waits. Can I check multiple form fields in one test? Yes, soft assertions gather all failures before reporting, so you can validate all inputs simultaneously. Does it support visual regression testing? Yes, it compares screenshots with configurable thresholds to detect subtle UI changes.
Attach the Assertions skill to any Metaflow agent task that involves UI or API validation to enable automated, retry-aware checks against target locators or endpoints. Expect detailed failure reports that include all assertion errors within a task run, particularly helpful for validating form fields or multi-step flows. This skill integrates seamlessly to boost confidence in your CRO experiments and quality gates by...
For broader context, see our roundup of claude marketing skills, and read Claude Code workflows for marketing agencies for related setup guidance.