Skip to content

[BUG]Page.screenshot() the param mask_color is invalid,always pink #2204

Closed
@Summer1oo86

Description

@Summer1oo86

System info

  • Playwright Version: [v1.40.0]
  • Operating System: [macOS]
  • Browser: [All]
  • Other info:

Source code

Test file (self-contained)

from playwright.sync_api import Page
def test_screenshot(page: Page):
    page.goto("https://www.baidu.com")
    page.screenshot(path='screenshot/a.png', mask=[page.locator('#s-top-left')], mask_color='white')

Steps

  • [Run the test]
  • [...]

Expected

mask color is white

Actual

mask color always pink

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions