Skip to content

[BUG] When different engineers compare screenshots, the resize UI of the textArea is misaligned by 1px. #21457

@daisuke-okada

Description

@daisuke-okada

System info

  • Playwright Version: [v1.29.2]
  • Operating System: [macOS 13.2, macOS 11.5.2] ※but, I didn't check other versions.
  • Browser: [Chromium]
  • Other info:

Source code

  • [] I provided exact source code that allows reproducing the issue locally.

Config file

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'], },
    },
});

Test file (self-contained)

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

test('testTitle', async ({ page }) => {
  await page.goto('url');
  await expect(page).toHaveTitle(/pageTitle/);
  await page.evaluate(() => window.scroll({ top: 0 }));
  await expect(page).toHaveScreenshot(); // problem occurred
});

Steps

  • Run the test
  • and then error occurred
Error: Screenshot comparison failed:
      6 pixels (ratio 0.01 of all image pixels) are different.

Expected
The test should be succeeded no matter who does it.

Actual

The following errors may or may not occur when the same test is performed by different engineers.
There are people who succeed even if the version of mac Os is different, but the error in the attached screenshot occurs

image
image
image

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