Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Screenshot masking not working for fullpage #31060

Closed
sloeff opened this issue May 29, 2024 · 2 comments
Closed

[Bug]: Screenshot masking not working for fullpage #31060

sloeff opened this issue May 29, 2024 · 2 comments

Comments

@sloeff
Copy link

sloeff commented May 29, 2024

Version

1.44

Steps to reproduce

I cannot share the SUT since its running on a .local domain but I do my best to share enough info to reproduce the issue. Just DONT outright close it when information is lacking. Just ask for info that you require.
The problem started when updating to Playwright v 1.44, 1.42.1 worked fine. We do full page visual comparsions since we have a lot of functionality for the responsive site. Since 1.44 we see that not all elements we want to mask are being masked. At some point Playwright stops masking which obviously creates failing tests. (we mask elements for a reason).

Expected screenshot was made in Playwright v1.42.1, actual is Playwright v1.44. (Please ignore the black markers)
Comparison

Repo: https://github.com/sloeff/playwright_issue

Reproduction steps:

  1. I recommend using a page with the same element repeating lots of times over the hole page.
  2. Change the mask Locator to this element
  3. Run the test and check the test report
  4. Notice in the report that not all element that are marked for masking are masked

Expected behavior

Masking is correctly over the specified elements on the full page

Actual behavior

The mask option within toHaveScreenshot doesn't mask all elements on the page. The top elements get masked futher down the page the elements are not longer masked.

Additional context

No response

Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Xeon(R) Platinum 8276 CPU @ 2.20GHz
    Memory: 8.46 GB / 16.00 GB
  Binaries:
    Node: 16.20.1 - C:\Program Files\nodejs\node.EXE
    npm: 8.19.4 - C:\Program Files\nodejs\npm.CMD
  Managers:
    Maven: 3.8.2 - D:\tools\apache-maven-3.8.2\bin\mvn.CMD
  Utilities:
    Git: 2.39.2.
    Curl: 8.4.0 - C:\WINDOWS\system32\curl.EXE
  IDEs:
    VSCode: 1.89.1 - C:\Users\<redacted>\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.2.12 - C:\Program Files\Git\bin\bash.EXE
    Java: 1.8.0_341
  Browsers:
    Edge: Chromium (125.0.2535.51)
    Internet Explorer: 11.0.19041.4355
@dgozman
Copy link
Contributor

dgozman commented May 29, 2024

This looks like a duplicate of #30770, which was already fixed in v1.44.1. Please update Playwright to the latest version and let me know whether that helped.

@sloeff
Copy link
Author

sloeff commented May 30, 2024

Yes, the issue is resolved. Thanks!

@sloeff sloeff closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants