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

feat(types): export ScreenshotOptions #6419

Merged

Conversation

JoelEinbinder
Copy link
Contributor

Exports ScreenshotOptions as a new type. Screenshots have a fairly complicated set of options, and they are likely to be exposed by libraries that wrap Playwright.

fixes #4752

@@ -6,5 +6,6 @@
"BrowserNewContextOptions": "BrowserContextOptions",
"BrowserNewContextOptionsViewport": "ViewportSize",
"BrowserNewContextOptionsGeolocation": "Geolocation",
"BrowserNewContextOptionsHttpCredentials": "HTTPCredentials"
"BrowserNewContextOptionsHttpCredentials": "HTTPCredentials",
"PageScreenshotOptions": "ScreenshotOptions",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bit confusing, because elementHandle.screenshot does not take these options (it is missing the clip). WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PageScreenshotOptions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@JoelEinbinder JoelEinbinder merged commit 447a0c4 into microsoft:master May 20, 2021
sand4rt pushed a commit to sand4rt/playwright that referenced this pull request Dec 21, 2022
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

Successfully merging this pull request may close these issues.

[Feature] export the screenshot options type
3 participants