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 Feature Fails to Operate Properly #30752

Closed
job221 opened this issue May 11, 2024 · 1 comment
Closed

[Bug]: Screenshot Masking Feature Fails to Operate Properly #30752

job221 opened this issue May 11, 2024 · 1 comment

Comments

@job221
Copy link

job221 commented May 11, 2024

Version

1.44.0

Steps to reproduce

I am encountering an issue where the screenshot masking feature does not function correctly when taking long screenshots. Despite using the following code to mask certain elements, the specified elements are still visible in the captured screenshot.

// Wait until the page is completely loaded
await page.screenshot({
path: 'screenshot.png',
fullPage: true,
mask: [
page.locator('section').filter({ hasText: '2. Open page' }).locator('video'),
page.locator('section').filter({ hasText: 'AIMTe Video' }).locator('video')
]
});

Steps to Reproduce:

Navigate to the page where the videos are embedded.
Execute the screenshot command as provided in the code snippet.
Observe that the specified elements are not masked in the resulting screenshot.

Expected behavior

Expected Behavior:
The videos located within sections containing the texts '2. Open page' and 'AIMTe Video' should be masked out in the screenshot.

Actual behavior

Actual Behavior:
The videos are not being fully masked and appear as usual in the screenshot.

Additional context

In Playwright version 1.43.1 works perfectly

Environment

Operating System:  Windows 11 23H2 
Ryzen 7, 64 GB RAM DDR4
Intel Intel(R) N95 16GB RAM DDR4
Browser: Chrome 124.0.6367
Node: v20.10.0 / v22.1.0
Visual Studio Code 1.89.1
Playwright Extension version 1.0.22 / 1.1.0 (same result in both)
@mxschmitt
Copy link
Member

This issue is not following the bug template. Please re-file and provide a self-contained reproduction, which we can run locally to reproduce your issue. Thanks for your understanding!

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