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
Request: page.html() #406
Comments
I see how to do it now https://github.com/GoogleChrome/puppeteer/blob/master/examples/search.js . I will write an example and submit a pr for the readme. |
See #331 (comment) |
If you want a more complete html, including doctype and html tag (which I think is the real page html, not the innerhtml) you can use
|
If you want to minimize the alterations added by XMLSerializer: const html = await page.evaluate('new XMLSerializer().serializeToString(document.doctype) + document.documentElement.outerHTML'); |
Simple just use const html = await page.content(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Return the html of the current page. Is there an easy way to do this I'm not seeing?
The text was updated successfully, but these errors were encountered: