Skip to content

[Bug]: Screenshot operation not working as expected for zoom operation #36354

Open
@maneet057

Description

@maneet057

Version

1.50.1

Steps to reproduce

Zoom functionality in use:

 await this.ExecuteScriptAsync<string>($"() => document.body.style.zoom='{message}'");

Screenshot functionality in use:

 var testTelemetry = new TestTelemetry(TestTelemetryEvent.BrowserScreenShot);
 testTelemetry.StartTelemetry();
 var screenShot = await this.PlaywrightPage.ScreenshotAsync();
 var image = new Bitmap(new MemoryStream(screenShot));
 testTelemetry.EndTelemetry();
 return image;

Expected behavior

Expected to see the test passed after comparison.

Actual behavior

Getting error: Assert.IsFalse failed. Matching region found to compare baseline and treatment. However, the difference in size between images is more than expected, failing test.

Additional context

No response

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD EPYC 7763 64-Core Processor
    Memory: 28.90 GB / 63.95 GB
  Binaries:
    Node: 23.8.0 - Q:\.tools\.npm-global\node.CMD
    npm: 11.1.0 - Q:\.tools\.npm-global\npm.CMD
  IDEs:
    VSCode: 1.100.2 - C:\Users\maneetkaur\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.1.16 - C:\Windows\system32\bash.EXE
  npmPackages:
    playwright: ^1.50.1 => 1.50.1

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