Skip to content

[Feature request]  #27

@tiagosousa02

Description

@tiagosousa02

@choraria
Is your feature request related to a problem? Please describe.
We need a way to take screenshot of HTML elements and not just the page.

Describe the solution you'd like
Ideally we can have a query param that accepts the HTML element and screenshots it instead of the page if existent.

Describe alternatives you've considered
No real alternatives besides hosting it myself.

Additional context
Usage example

  const element = await page.$('.MuiBox-root.mui-style-1evyyw3');
  const screenshotBuffer = element
    ? await element.screenshot({ type })
    : await page.screenshot({ fullPage, type });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions