For a native full-page screenshot in Selenium .NET, use FirefoxDriver’s GetFullPageScreenshot() method. It returns a screenshot of the full page, not just the visible viewport. Selenium’s ordinary ITakesScreenshot.GetScreenshot() method is described as capturing the page on screen, so don’t assume it includes content below the fold. If you need Chrome or another Chromium browser, use its version-matched Selenium DevTools API; that is a separate, browser-specific route.
Choose the capture method for your browser
The most direct path depends on which browser you need to automate. Firefox exposes a Selenium-specific full-page method. Chromium capture can use Selenium DevTools settings that include an option to capture beyond the viewport, but those generated bindings are tied to DevTools versions. Scrolling and joining viewport images is another possible fallback, not a guaranteed drop-in replacement.
| Route | Browser scope | What to expect | Main consideration |
|---|---|---|---|
FirefoxDriver.GetFullPageScreenshot() |
Firefox | Returns a Selenium Screenshot for the full page. |
Call it on a FirefoxDriver, not on an arbitrary IWebDriver. |
Selenium DevTools screenshot with CaptureBeyondViewport |
Chromium, using the matching generated binding | The setting controls capture beyond the viewport; its documented default is false. | Namespace and compatibility depend on the Selenium package’s DevTools binding and browser version. |
| Scroll and stitch viewport images | Potentially multiple browsers | Captures successive screen regions and combines them into one image. | Must be evaluated on the target page; sticky items, lazy content, and layout changes can create artifacts. |
If Firefox is acceptable, use the native method below. If Chrome is mandatory, use the Chromium-specific section and verify the installed binding rather than copying a namespace from a different Selenium version.
Capture a full page in Firefox with C#
This example opens a URL, waits for the browser’s initial document load to finish, invokes Firefox’s full-page capture method, and writes the PNG bytes to disk. It intentionally uses FirefoxDriver as the driver type so the full-page method is available.
#1 Best Overall
1. Create a console project and add Selenium
Install a .NET SDK, then create a console application and add the Selenium WebDriver NuGet package. Firefox must also be installed. Selenium’s driver management can locate or obtain a compatible driver in supported setups; if your environment manages browser drivers separately, configure that before running.
dotnet new console -n FullPageShotcd FullPageShotdotnet add package Selenium.WebDriver
2. Replace Program.cs
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
var targetUrl = args.Length > 0 ? args[0] : "https://example.com";
var outputPath = args.Length > 1 ? args[1] : "full-page.png";
var options = new FirefoxOptions();
// Uncomment to run Firefox without a visible browser window.
// options.AddArgument("-headless");
using var driver = new FirefoxDriver(options);
driver.Navigate().GoToUrl(targetUrl);
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
wait.Until(d => ((IJavaScriptExecutor)d)
.ExecuteScript("return document.readyState")?.ToString() == "complete");
Screenshot screenshot = driver.GetFullPageScreenshot();
screenshot.SaveAsFile(outputPath);
Console.WriteLine($"Saved full-page screenshot to {Path.GetFullPath(outputPath)}");
3. Run it and check the output
Pass the page URL and output filename as arguments. For example:
dotnet run -- "https://example.com" "example-full.png"
Open the saved PNG and confirm that the sections below the fold are present. The document-ready check only waits for the browser’s document load state; it does not prove that every application request, animation, lazy image, or embedded widget has finished.
Prepare dynamic pages before capture
A full-document screenshot captures the page’s rendered state; it does not itself guarantee that the page has loaded every off-screen resource. On a page that loads content as the user scrolls, the browser may not have fetched images or populated sections near the bottom before the screenshot call.
Rank #2
- Wait for the content you need. Prefer a page-specific condition, such as the presence of a known element or completion indicator, over an arbitrary short delay.
- Trigger lazy loading when necessary. If a target page loads images only near the viewport, scroll through the relevant regions and wait for them to load before capturing. Verify this behavior on the site; scrolling may alter pages with infinite loading.
- Account for animations and asynchronous widgets. Wait for the page state you want to preserve. A loading indicator disappearing or a particular element becoming visible can be a better signal than document readiness alone.
- Inspect fixed and sticky elements. Headers, consent panels, and floating controls may appear differently in a full-page image than in an ordinary viewport screenshot. Check for repeated, overlapping, or obscured content.
- Check nested scroll areas separately. A long element inside its own scroll container is not necessarily part of the document’s overall page height. Confirm that the information inside that area appears in the final image.
There is no universal wait condition that fits every application. Make the condition reflect the content that matters to your capture, and inspect the image rather than treating a successful API call as proof that the page is complete.
Capture a full page in Chrome or Chromium
Selenium’s generated DevTools Page screenshot settings expose CaptureBeyondViewport, documented with a default of false. This is the relevant Chromium direction when the screenshot must include content beyond the current viewport. It is not the same API as Firefox’s GetFullPageScreenshot(), and that Firefox method should not be presented as a cross-browser IWebDriver feature.
DevTools classes are generated for particular protocol versions. Before writing or adopting C# code, inspect the Selenium package installed in the project for its OpenQA.Selenium.DevTools.V### namespace and Page screenshot command types, then confirm that the binding is compatible with the Chromium version you run. The available API reference identifies a v147 settings class, but that does not establish a universal namespace, compatibility matrix, or copy-paste command for every installed package. Do not substitute a guessed version number in code.
Once you have matched the binding, configure the Page screenshot command to capture beyond the viewport and save the returned image data. Keep the browser-specific implementation isolated behind your own capture method if the application must support both Firefox and Chromium. That makes the version-sensitive DevTools code easier to update without changing navigation and page-readiness logic.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Rank #3
Why ordinary Selenium screenshots are not enough
ITakesScreenshot.GetScreenshot() returns an image described by Selenium .NET as the page on screen. Use it when a viewport image is what you want. Its general documentation does not establish it as a full-document method, so a tall page may be clipped if you treat it as one.
Use scrolling and stitching only as a tested fallback
A stitching method scrolls the page, captures several viewport images, and combines them into a single tall image. It can be considered when a native browser-specific route is unsuitable, but the available example for a third-party combination package is from 2020 and does not establish that the package is maintained or compatible with current Selenium and browser versions. This article therefore does not prescribe a particular stitching dependency.
Before relying on stitching, test the exact page and browser versions you deploy. The method can produce visible seams or inconsistent content when the page changes between captures. Sticky headers may be repeated; lazy-loaded sections may appear only after scrolling; animations can put adjacent captures at different states; and a nested scroll region may not move with the document. A layout shift during capture can also make adjoining screenshots misalign. If those conditions matter, a browser-native full-page route is usually a simpler implementation to evaluate first.
Troubleshooting
The method does not compile
Confirm that the variable is declared as FirefoxDriver and that the project references Selenium WebDriver. GetFullPageScreenshot() is a FirefoxDriver-specific method; it is not promised by the general IWebDriver interface. If using Chromium, do not paste Firefox code or a DevTools namespace from an unrelated Selenium binding.
Firefox will not start
Check that Firefox is installed and can be launched in the execution environment. If the browser driver is managed externally, ensure the driver is available and compatible with that Firefox installation. In a container or server, confirm that the selected headless or display setup is supported by your environment.
Rank #4
The image is only as tall as the viewport
Check which method actually ran. The standard GetScreenshot() call is an on-screen screenshot. For Firefox, call GetFullPageScreenshot(); for Chromium, use the matching DevTools Page screenshot path and enable capture beyond the viewport.
Images or sections are blank
The capture may have run before those resources or application sections loaded. Wait for the relevant page-specific condition, trigger lazy-loaded content as needed, and inspect the final image. A completed document-ready state alone is not a guarantee that off-screen content has finished loading.
The full-page image has repeated headers or seams
This is especially likely with scroll-and-stitch capture, because it combines multiple page states. Test the target page’s sticky elements and layout behavior, and prefer a native full-page route if those artifacts are unacceptable. Do not assume one stitching implementation will behave identically across sites.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The Chromium DevTools command or namespace is missing
Check the Selenium package version and the generated V### namespace it contains, then match the command types to that binding and verify browser compatibility. A v147 API reference does not mean every Selenium package exposes that same namespace or works with every Chromium release.
Or skip the browser setup
If you need a screenshot endpoint rather than Selenium-controlled browser automation, ScreenshotNeo provides a one-request website screenshot API and an MCP server. Its capture flow accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. AI agents can use its MCP tools, including take_screenshot, get_page_info, and capture_pdf.
For a PNG, JPEG, or WebP response, or a PDF, make a GET request to the API. The following cURL example saves a WebP screenshot:
Best Value
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 parameters and response details. One call can also be made from Python or Node.js:
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 errorsimport 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}`);
The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Practical reliability and cost choices
For an automated test suite, Selenium keeps navigation and capture in the browser session you control, but you must manage browser startup, readiness, compatibility, and output inspection. Firefox’s native method has the clearest direct full-page call in Selenium .NET. Chromium’s DevTools route adds version coupling, while stitching adds multiple captures and page-specific artifact risks. There are no cited benchmarks establishing a speed, output-quality, or maximum-height winner, so compare the methods against your own pages and deployment environment.
For recurring jobs, make each capture reproducible: use a stable target URL, a deterministic page state, explicit waits for required content, and a saved artifact that can be inspected when a test fails. Record which browser and Selenium package version produced the image, especially when using DevTools bindings. Budget for browser processes and their runtime in a Selenium workflow; an API instead has a per-plan usage allowance. Select based on whether you need interactive browser automation, browser-specific control, or a straightforward screenshot request.
Frequently Asked Questions
Can Selenium’s standard screenshot interface promise a full-document image?
No. Its documented description is an image of the page on screen; use a browser-specific full-page route when the entire document is required.
Does Firefox’s full-page capture include every lazy-loaded image automatically?
The API documentation does not establish that guarantee. Load the content the target page requires before capturing, then inspect the result.
Is there a currently verified .NET stitching package for Chrome recommended here?
No. The available package example is a 2020 tutorial and does not establish current maintenance or compatibility.
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.

