Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsSymfony Panther’s documented $client->takeScreenshot('screen.png') captures the current page, but Symfony does not promise that it captures the full document height. For a long page, you can try a community-reported workaround: read the document’s scroll dimensions with JavaScript, resize the WebDriver window to those dimensions, then take the screenshot. Validate the result in your own browser and driver setup; it is not a guaranteed Panther full-page API.
What Panther’s screenshot method captures
Panther runs a real browser through WebDriver and can execute JavaScript and take screenshots during a test. Its documented call is $client->takeScreenshot($path). The Symfony guide describes a screenshot of the current page, not a contractual full-document capture. Panther’s implementation starts the client and delegates to the underlying WebDriver’s takeScreenshot() method, so the actual capture behavior may depend on the browser and driver.
As an Amazon Associate I earn from qualifying purchases.
Symfony’s guide shows that screenshot dimensions are affected by the browser window size, including Chrome configured with --window-size=1500,4000 and Firefox resized with WebDriverDimension. This supports the window-resizing approach below, but does not establish that every browser or driver will capture every pixel of a long document that way.
Try the window-resizing workaround
The following PHP example follows a technique reported in Symfony Panther issue #587. It measures the document, resizes the browser window, and then asks Panther to save a screenshot. The issue was opened on February 20, 2023; it is a community report, not an official API guarantee.
#1 Best Overall
<?php
use FacebookWebDriverWebDriverDimension;
use SymfonyComponentPantherClient;
$client = Client::createChromeClient();
$client->request('GET', 'https://example.test/long-page');
$width = $client->executeScript('return document.documentElement.scrollWidth');
$height = $client->executeScript('return document.documentElement.scrollHeight');
$client->manage()->window()->setSize(new WebDriverDimension($width, $height));
$client->takeScreenshot('long-page.png');
Replace https://example.test/long-page with the page under test and ensure the destination directory is writable. This example uses Chrome; it does not demonstrate cross-browser compatibility or establish a maximum supported image size.
Wait for the right page state first
Measure only after the content you need is present. A page may add content asynchronously, load images lazily, or change height after the initial response. Panther supports JavaScript execution and waiting for elements, but there is no universal readiness condition for every site. Use a page-specific condition, such as waiting for a known content element, before reading scrollWidth and scrollHeight. If the page keeps growing after measurement, the saved image may omit later content.
Rank #2
Check the result rather than assuming full-page capture
Open the image and confirm that its width, height, and bottom content match the intended page state. If the result is clipped, blank, or unexpectedly small, treat that as a browser/driver or page-specific limitation and investigate before relying on it in a test pipeline. The available Panther documentation and issue report do not establish reliability limits across browser versions, drivers, or page types.
Recommended Free Tools
Browser and driver setup
Panther controls Chrome or Firefox using WebDriver, so the matching browser and driver setup matters. Symfony’s end-to-end testing guide describes ChromeDriver and GeckoDriver installation, including the dbrekelmans/bdi driver-installer option. Follow the current Symfony instructions for your installed Panther version and chosen browser; do not assume a driver setup for one browser applies to the other.
The Symfony package page listed Panther 2.4.0 as the latest version when observed, but package versions change. Check Packagist’s Symfony Panther page for the current release rather than pinning an article’s version number as current.
Troubleshooting
- The screenshot contains only the visible viewport: The documented Panther method is not specified as guaranteed full-document capture. Confirm that resizing took effect and inspect the output; browser or driver behavior can vary.
- The bottom of the page is missing: The page may have grown after dimensions were measured. Wait for the relevant content or lazy-loaded elements before measuring, then capture again.
- The screenshot is blank or navigation did not finish: Make sure the page has reached the state your test requires before running the measurement and screenshot calls. Use an explicit, page-specific wait rather than assuming that navigation alone means all dynamic content is ready.
- The browser window cannot be resized to the requested dimensions: Check the values returned by the document measurements and the browser/driver setup. Very large pages and browser or driver limits have not been established for this workaround, so reduce the test page or validate another capture method instead of assuming arbitrary dimensions are supported.
- The screenshot file is absent: Check that the destination path is writable and that the test process has permission to create the file.
Or skip the browser setup
If you need a screenshot without wiring up Panther and a browser driver, ScreenshotNeo provides a website screenshot API and MCP server. A single GET request can return an image or PDF. For example, this cURL request saves a WebP screenshot of the same long-page URL; see the ScreenshotNeo API documentation for request options.
Rank #4
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.test/long-page -o shot.webp
ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be disabled. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to try up to 1,000 screenshots a month with no card.
Quick Recap
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.




