Use browser automation to capture the full scrollable parent page: its screenshot will include the iframe as it appears inside its on-page viewport. If you need content that scrolls inside the iframe beyond that viewport, capture the frame’s document separately and combine the images. A parent page cannot freely inspect a cross-origin iframe’s document because of the same-origin policy.
Choose what “full page” means
An iframe creates two possible screenshot targets. A full-page capture of the outer page includes the iframe’s visible rectangle where it is embedded, but it does not necessarily expand that rectangle to include the iframe’s entire internally scrolling document.
As an Amazon Associate I earn from qualifying purchases.
- Whole outer page: capture the parent page from top to bottom. The iframe appears as rendered within its viewport.
- Entire embedded document: capture the iframe’s own content, including the portions reachable by scrolling inside it. This may require a separate capture and image composition.
Playwright defines fullPage as capturing the full scrollable page rather than only the current viewport. Puppeteer also documents full-page and element screenshots. These browser options address the page or selected element; do not assume that a parent-page full-page option expands a nested frame’s own scrolling area. See Playwright screenshot documentation and Puppeteer screenshot documentation.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteCapture the entire outer page with Playwright
Install Playwright and its Chromium browser, then save this as screenshot.mjs. Replace the URL with the page you need to capture.
#1 Best Overall
npm install playwrightnpx playwright install chromium- Run the script below with
node screenshot.mjs.
import { chromium } from 'playwright';
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
try {
await page.goto('https://example.com', { waitUntil: 'networkidle', timeout: 60000 });
// If the iframe or its contents load only after scrolling, scroll the parent
// page through its content before taking the screenshot.
await page.evaluate(async () => {
const step = Math.max(400, window.innerHeight * 0.8);
for (let y = 0; y < document.documentElement.scrollHeight; y += step) {
window.scrollTo(0, y);
await new Promise(resolve => setTimeout(resolve, 150));
}
window.scrollTo(0, 0);
});
await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
await browser.close();
}
This produces page.png for the parent page. The scroll pass can help trigger lazy-loaded material, but it cannot guarantee that every site has finished rendering. Review the image for missing content, clipped iframe edges, sticky elements, and whether the frame displays its own scrollbar.
Capture content that scrolls inside the iframe
First determine whether the iframe is same-origin with its parent. The origin consists of the scheme, host, and port. Parent-page JavaScript can access an iframe’s document only when the browser’s same-origin rules allow it. A cross-origin parent cannot simply read or change the embedded document; see MDN’s same-origin policy explanation.
If the iframe is same-origin
Playwright can locate the frame, then target an element inside it. For example, after the page has loaded, the following captures the frame’s document element as one image:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRank #2
- Intuitive interface of a conventional FTP client
- Easy and Reliable FTP Site Maintenance.
- FTP Automation and Synchronization
const frame = page.frameLocator('iframe').first();
await frame.locator('html').screenshot({ path: 'iframe.png' });
If the document is taller than the frame viewport, this element screenshot is a separate capture of the frame content—not an enlargement of the iframe in the parent screenshot. Inspect the result for clipping and confirm that the target selector matches the content you intend to capture. Playwright’s frame and locator APIs are documented at playwright.dev/docs/frames.
If the iframe is cross-origin
Browser automation can capture what is rendered in the frame, but the parent page’s JavaScript cannot use unrestricted DOM access to inspect it. If you control both the parent and embedded page, the pages can coordinate using postMessage; that is a messaging mechanism, not permission to bypass the same-origin policy. If you do not control the embedded page, capture its visible rendered output through browser automation and inspect the saved image. MDN explains cross-origin messaging at developer.mozilla.org/en-US/docs/Web/API/Window/postMessage.
Rank #3
When you need one image of both documents
Capture the outer page and the iframe’s full content separately, then combine the resulting images using an image editor or image-processing tool. The two captures represent different scrollable documents, so check their scale, alignment, and overlap before joining them. If the frame content is taller than the visible frame area, simply taking a parent full-page screenshot will not include the hidden portion.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo provides a screenshot API and MCP server. For a one-request capture, use this cURL example; replace the URL with the page you want. The response is a screenshot, not a combined capture of hidden iframe content, so confirm that the rendered iframe area is the target you need.
Quick Recap
Best Value
Rank #4
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.
Troubleshoot common capture problems
- The iframe is visible, but content below its scrollbar is missing: the parent screenshot captured the iframe viewport, not necessarily the frame’s entire inner document. Capture the frame separately and combine images if you need one long result.
- Frame access fails or the document is unavailable to page JavaScript: check whether the iframe is cross-origin. Use browser automation to capture rendered output, or arrange cooperative communication with
postMessageif you control both pages. - Images or sections are blank: some content loads only after scrolling or after additional time. Scroll through the relevant area before capture, wait for the content you need, and inspect the saved result rather than assuming a load event means every component is ready.
- The screenshot has clipped edges or unexpected sticky elements: inspect the output and adjust the viewport or capture target. Sticky headers and frame borders can affect how a full-page image looks.
- Repeated captures look different: visual output can vary with browser and host environment. Keep browser and operating-system versions consistent when reproducibility matters; Playwright notes environment variation in its screenshot documentation.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

