iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use Symfony Panther when you need a screenshot of a page rendered by a real browser. Panther drives Chrome or Firefox through WebDriver, executes JavaScript and saves the current page with takeScreenshot(). Install it with Composer, make a browser and matching driver available, request the URL, then capture the page.
1. Install Symfony Panther
Install Panther as a development dependency, which is the usual choice for test and local automation:
composer require --dev symfony/panther
Panther uses the WebDriver protocol. The environment running your PHP code must therefore have a supported browser and its corresponding driver, such as Chrome with ChromeDriver or Firefox with geckodriver.
Make a browser driver available
Symfony documents several setup options:
- Install
dbrekelmans/browser-driver-installerand runvendor/bin/bdi detect drivers. - Download drivers yourself and put them on the system
PATHor in your project’sdrivers/directory. - Install the browser and driver through your operating system’s package manager.
- Use a container image that already includes the browser and driver.
Use a browser and driver version combination that is compatible in the environment where the capture runs. A driver installed on your laptop does not automatically exist inside a CI job or Docker container.
#1 Best Overall
- 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
- 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
- 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
- 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
- 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0
2. Capture a page with Chrome
Create a Panther client, navigate to the site, and save the browser’s current viewport:
<?php
require __DIR__.'/vendor/autoload.php';
use SymfonyComponentPantherClient;
$client = Client::createChromeClient();
$client->request('GET', 'https://example.com');
$client->takeScreenshot('screen.png');
Run the script from your project directory. The resulting screen.png is written to the path supplied to takeScreenshot(). Use an absolute path when a worker, test runner or web process may have a different working directory.
Use Firefox instead
<?php
require __DIR__.'/vendor/autoload.php';
use SymfonyComponentPantherClient;
$client = Client::createFirefoxClient();
$client->request('GET', 'https://example.com');
$client->takeScreenshot('screen.png');
The screenshot call is the same; only the browser client changes.
Recommended Free Tools
3. Capture a Symfony application in an end-to-end test
For your own Symfony application, Panther’s PantherTestCase flow starts the application with Symfony’s built-in PHP web server and makes it available to the browser. A test can then request a route and save a screenshot after the page has rendered:
<?php
namespace AppTests;
use SymfonyComponentPantherPantherTestCase;
final class VisualSmokeTest extends PantherTestCase
{
public function testHomepageScreenshot(): void
{
$client = static::createPantherClient();
$client->request('GET', '/');
$client->takeScreenshot(__DIR__.'/../var/screenshots/home.png');
self::assertSelectorTextContains('h1', 'Welcome');
}
}
Make sure the destination directory exists and is writable by the test process. Keep screenshots outside version control if they are generated on every CI run, or store selected artifacts when a visual failure needs investigation.
Rank #2
- AV TO USB Converter: Capture videos and audios from VHS, VCR, Hi8, DV tapes to a PC, with the help of our USB Video Converter. Save room while digitizing your favorite old memories
- Quality Capture Card: Our USB Video Capture Card converting anolog RCA composite input into HD 720P USB output and capturing audio without any sound card. Advanced signal processing technology provides you with great precision, colors, resolutions, and details.
- Plug and Play: Automatically install the driver once you hook up this RCA to USB Converter to a PC. No external power is needed. User-friendly and easy to operate
- Wide Compatibility: The Video Capture Card can work with video devices with RCA connector or S-Video connector, such as VHS, VCR, Hi8, camcorder, compatible with Windows and Mac OS. Support video formats like NTSC, PAL, and support brightness, contrast, hue, and saturation control
- Note: The Video Converter is used with acquisition software. We recommend OBS Studio or PotPlayer for Windows, and QuickTime Player for Mac. They can be downloaded for free online. Please operate according to the steps in User Manual or contact us if you have any questions
4. Control screenshot dimensions
Browser window dimensions affect the dimensions of the captured image. Panther’s documented Chrome example passes a window-size argument:
$client = Client::createChromeClient(null, [
'--window-size=1500,4000',
]);
This sets a 1,500 by 4,000 pixel browser window; it should not be interpreted as a guaranteed automatic full-page screenshot API. For Firefox, set the window dimensions through WebDriver according to the browser and driver API you use.
Viewport versus full-page images
takeScreenshot() captures the browser’s current page view. The official Symfony guide does not document an automatic full-page capture method. If you need the entire document, verify the exact behavior of your chosen browser and driver. A community workaround is to measure document.documentElement.scrollWidth and scrollHeight, resize the window, and then capture, but that approach is not guaranteed for every page or driver.
Long pages can also contain lazy-loaded images, sticky elements, animations and content that changes while scrolling. Decide whether a viewport image or a stitched/full-document workflow is acceptable for your use case before building it into tests.
5. Wait for the page you actually want to capture
Request completion does not necessarily mean that a JavaScript application has finished rendering. Use Panther’s browser controls to wait for a selector or other application-specific condition before calling takeScreenshot(). For example, wait for a dashboard element that appears only after data loading, then capture. Also consider disabling animations in test CSS so screenshots are stable.
Authentication and test data
For protected pages, establish the session in the browser before navigating to the target route, or arrange test fixtures and authentication in your Symfony test environment. Do not put production credentials in source code or CI logs. Seed deterministic data when screenshots are used for visual comparisons; timestamps, random IDs and live API responses create false differences.
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 errorsRank #3
- 【4K HDMI Input, 2K@30Hz Recording】Powered by a true USB 3.0 high-speed interface, the capture card supports up to 4K@30Hz HDMI input and records at 2K@30Hz or 1080P@60Hz. Perfect for gamers, streamers, and professionals who need crisp, smooth video for live streaming, gameplay recording, or online meetings.
- 【Ultra Low Latency Screen Sharing】Built with a premium aluminum alloy shell and advanced chipset for stable heat dissipation, ensuring ultra-low latency transmission. Capture high-quality video and dual-channel audio in real time—no lag, no frame drop—ideal for Twitch, YouTube, or OBS streaming.
- 【Easy Plug and Play, Compact & Portable】No driver or external power required—just plug and play via USB 3.0 or Type-C connection to your Windows or macOS computer. Lightweight and compact design makes it easy to carry for outdoor streaming, live shows, or mobile recording setups.
- 【Wide Compatibility & Multi-Device Support】Compatible with Windows 7 8 10 11, macOS, Linux,Android and supports most popular software such as OBS, Zoom, VLC, Twitch Studio, and more. Works seamlessly with PS4, PS5, Xbox, Switch, DSLR cameras, TV boxes, and other HDMI-output devices for streaming to YouTube, Twitch, etc.
- 【What You Get】Includes: HDMI Capture Card, USB 3.0 to USB-C Adapter, User Manual. Tips: Make sure your tablet’s OTG function is enabled before connecting. Test your HDMI device with a monitor first to confirm video and audio output, then connect to the Video Capture Card for recording.
6. Headless mode, debugging and containers
Panther can run a real browser headlessly, which is suitable for CI. To display the browser while diagnosing a failure, Symfony documents the PANTHER_NO_HEADLESS environment variable.
PANTHER_NO_HEADLESS=1 vendor/bin/phpunit
Container documentation also discusses PANTHER_NO_SANDBOX. This disables Chrome sandboxing and is a container-specific setting, not a default requirement. Use it only when your container security model requires it, and prefer a correctly configured sandbox where possible.
7. Panther versus BrowserKit
| Client | JavaScript and CSS | Screenshot capture | Best use |
|---|---|---|---|
| Panther native Chrome or Firefox client | Yes | Yes | Images of pages as a real browser renders them; end-to-end tests |
| BrowserKit-based client | No real browser rendering | No | Faster simulated requests, links and forms |
BrowserKit is useful when you only need to inspect HTTP responses or exercise forms without a browser. It is not a substitute for Panther when the image must include JavaScript-generated content, CSS layout or browser rendering.
8. A reliable screenshot workflow
- Choose the browser. Start with Chrome or Firefox and its matching WebDriver.
- Install Panther. Run
composer require --dev symfony/panther. - Verify drivers. Confirm the browser and driver are available in the same machine or container as PHP.
- Create the client. Use
Client::createChromeClient(),Client::createFirefoxClient()orstatic::createPantherClient()in aPantherTestCase. - Request the URL. Navigate to the public page or your application’s test route.
- Wait for dynamic content. Wait for a meaningful selector and make test data deterministic.
- Set dimensions. Pass a browser window size when a fixed viewport is required.
- Save the image. Call
takeScreenshot()with a writable, explicit path. - Inspect failures. Run headed with
PANTHER_NO_HEADLESS, preserve the failing screenshot and check browser/driver logs.
9. Troubleshooting Panther screenshots
“Unable to connect to the WebDriver server”
The driver is missing, not on PATH, not executable, or incompatible with the installed browser. Install it with the documented installer or package manager, verify its location, and check browser-driver compatibility inside the same runtime.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →The browser starts and immediately exits
Inspect the CI or container logs for missing shared libraries, insufficient permissions or sandbox restrictions. In a container, review the Panther container guidance and use PANTHER_NO_SANDBOX only when appropriate.
Rank #4
- [Enhanced 4K-1080P Video Capture Experience] Capture the Magic: Elevate your video recordings to new heights with our upgraded anti-static 1080P Video Capture Card. Immerse yourself in stunning visuals, supporting HDMI input at 4K 60FPS and USB output for capturing in 1080P, complete with rich stereo sound. Enjoy crystal-clear video recordings, dynamic gaming live streams, and professional conference broadcasts. Note: HDMI resolution: Max input can be 3840×2160@30Hz / Video output resolution: Max output can be 1920×1080@30Hz
- [Seamless Real-Time Preview] Stay in the Moment: Our advanced ultra-low latency technology ensures seamless real-time transmission of video streams. Experience instant, lag-free previews, allowing you to capture every detail precisely. Effortlessly record video directly to your hard disk, all without compromising on quality or introducing any delays.
- [Versatility and Broad Compatibility] Your Creative Hub: Connect your DSLR, camcorder, or action camera to a wide range of operating systems, including Windows, MacOS, and Linux. Unlock a world of possibilities with real-time streaming to popular platforms like Twitch, Youtube, OBS, Zoom, Potplayer, and VLC, giving you the tools to share your content effortlessly.
- [Effortless Plug and Play] Simplicity Redefined: Say goodbye to complex installations. Our plug-and-play design eliminates the need for drivers or external power supplies. Seamlessly integrate high-definition acquisition into various scenarios, whether it's educational recordings, immersive gaming, precise medical imaging, captivating live streams, or professional broadcasting.
- [Seize Every Detail with Precision] Unleash your creativity and attention to detail with our video capture card. Capture every nuance, every color, and every moment with precision, thanks to the enhanced capabilities of our technology. Whether you're a content creator, a gamer, or a professional, our capture card empowers you to seize the finest elements and bring them to life in your recordings and live streams.
The screenshot is blank or missing application content
The capture may occur before JavaScript finishes, the route may require authentication, or the application may have returned an error page. Wait for a content selector, assert the expected status or text, and capture a headed run with PANTHER_NO_HEADLESS to see what the browser sees.
The image has the wrong size
Check the browser window dimensions and device pixel behavior. A window-size argument controls the browser window; it does not promise a full-document image. Confirm the actual pixel dimensions of the saved file rather than assuming CSS viewport units equal image pixels.
Only the visible portion of a long page is saved
This is consistent with viewport capture. Symfony’s official guide does not provide an automatic full-page API. Validate a browser-specific resize or stitching strategy before relying on it, especially for pages with lazy loading or fixed-position elements.
CI is flaky but local runs pass
Use fixed test data, wait for a stable selector, disable animations, pin the browser/driver environment, and give the CI machine enough resources. Save diagnostic screenshots and logs on failure instead of comparing pages that are still loading.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If you need an automated website image rather than a browser test inside your Symfony project, ScreenshotNeo provides a single HTTP request. It accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before the capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. It also offers an MCP server with take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.
See the ScreenshotNeo API documentation for all options. A cURL request is:
Best Value
- 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
- 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
- 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
- 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
- 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same call from PHP (and therefore a Symfony service or command) can use Symfony’s HTTP client or plain PHP cURL. The documented Python and Node.js examples are:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo supports PNG, JPEG, WebP and PDF output, full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets, arbitrary viewports, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, clicks, selector/delay/network-idle waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Its parameter names are compatible with those used by other screenshot APIs, which can simplify migration.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is available on every plan. Create a free ScreenshotNeo account.
10. Practical cost and reliability choices
- Panther: no screenshot-service charge, but you maintain browser binaries, drivers, CI resources and the timing of your tests.
- ScreenshotNeo: usage is metered by clean shots; failed loads and cache hits are not billed, and caching can be configured with a TTL.
- Testing: keep Panther for assertions about your Symfony application and use a capture API when you need repeatable external-page images without maintaining browsers.
Frequently Asked Questions
Can Symfony BrowserKit take a screenshot?
No. BrowserKit-based clients are faster simulated clients, but the documented screenshot capability belongs to Panther’s native browser client.
Does Panther automatically make a full-page screenshot?
Symfony’s current guide documents viewport capture and window sizing, not an automatic full-page screenshot API. Verify any browser-specific workaround you adopt.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Can Panther run in CI without a display?
Yes. Panther’s real browser can run headlessly; set PANTHER_NO_HEADLESS when you need to display it for debugging.
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.

