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

Does work the page.Screenshot() function with MaskColor? #388

Closed
Lonka opened this issue Nov 3, 2023 · 2 comments · Fixed by #389
Closed

Does work the page.Screenshot() function with MaskColor? #388

Lonka opened this issue Nov 3, 2023 · 2 comments · Fixed by #389
Labels
p2-bug Something isn't working p3-collecting-feedback

Comments

@Lonka
Copy link

Lonka commented Nov 3, 2023

Hello,

I try to screenshot the page and mask the element by different color(#000000), but always mask the default color(#FF00FF).

page.Screenshot(playwright.PageScreenshotOptions{
  Path: playwright.String(screenshotPath),
  Mask: []playwright.Locator{
	  sensElem,
  },
  MaskColor: playwright.String("#000000"),
})

Are there any setting I am missing?

Also, I would like to know dose this MaskColor code could set the transparency value like #80000000 (50%) or rgba(0,0,0, 50)?

thank you.

@canstand canstand added p2-bug Something isn't working p3-collecting-feedback labels Nov 3, 2023
@canstand
Copy link
Collaborator

canstand commented Nov 4, 2023

fixed with #389, pls try again.

@Lonka
Copy link
Author

Lonka commented Nov 6, 2023

Hi,

It's perfect for me. I also tried set the rgba(0,0,0,0.5) on the MaskColor property. As expected, the elements is masked as transparent.

thank you

@canstand canstand closed this as completed Nov 6, 2023
@canstand canstand linked a pull request Nov 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-bug Something isn't working p3-collecting-feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants