Playwright

Microsoft's open-source tool for automating Chromium, Firefox and WebKit browsers, widely used for end-to-end and visual tests.

In more detail

await expect(page).toHaveScreenshot() captures a screenshot and compares it with a stored baseline, failing on differences beyond a tolerance such as maxDiffPixelRatio. Options can disable animations during capture.

Example

await expect(page.getByRole('button', { name: 'Submit' })).toBeVisible()

Related terms

Taught in

References