-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
β³ 5EFFORT: An issue requiring a high effortEFFORT: An issue requiring a high effortβ¨ featureTYPE: An enhancement or a new featureTYPE: An enhancement or a new featureπ¦ readySTATUS: An issue that have been reproduced, reviewed, estimated, and is ready to be worked onSTATUS: An issue that have been reproduced, reviewed, estimated, and is ready to be worked onπ© lowPRIORITY: An issue that is not urgentPRIORITY: An issue that is not urgent
Milestone
Description
Is This New?
- I have read all available documentation (ex. README.md, CONTRIBUTING.md, external docs site, etc.)
- I have searched for existing issues
- I'm willing to implement this myself (optional)
What?
Add support for generating screenshots of specific elements rather than the whole page.
In the screenshot config, expose a property that allows users to provide a CSS selector. If provided, use this CSS selector to get a specific element using Locators and call the screenshot method on it instead.
Ensure errors are handled properly since there will be cases where the element doesn't exist, syntax is invalid, etc.
Why?
Puppeteer also supports taking screenshots of individual elements with ElementHandle.screenshot(). Users may want to take screenshots of elements rather than the whole page when showcasing components in documentation, cropping pages, etc.
Alternatives
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
β³ 5EFFORT: An issue requiring a high effortEFFORT: An issue requiring a high effortβ¨ featureTYPE: An enhancement or a new featureTYPE: An enhancement or a new featureπ¦ readySTATUS: An issue that have been reproduced, reviewed, estimated, and is ready to be worked onSTATUS: An issue that have been reproduced, reviewed, estimated, and is ready to be worked onπ© lowPRIORITY: An issue that is not urgentPRIORITY: An issue that is not urgent