Skip to content

[Feature] 'toHaveScreenshot' should have ability to capture full page. #23243

@KunalOjha

Description

@KunalOjha

I have created a feature request for the ability of PlayWright's Visual Comparison flow to allow users the ability to capture full page screenshots for comparisons. I don't believe there is a way to configure this using the toHaveScreenShot method as outlined in the docs

Currently this is the way Playwright recommends to perform snapshot comparisons:

import { test, expect } from '@playwright/test';

test('example test', async ({ page }) => {
  await page.goto('https://playwright.dev');
  await page.screenshot({ path: 'screenshot.png', fullPage: true });
  await expect(page).toHaveScreenshot();
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions