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

[Feature request] #27

Open
tiagosousa02 opened this issue Sep 24, 2024 · 0 comments
Open

[Feature request] #27

tiagosousa02 opened this issue Sep 24, 2024 · 0 comments

Comments

@tiagosousa02
Copy link

tiagosousa02 commented Sep 24, 2024

@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 });
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

No branches or pull requests

1 participant