Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright’s Chromium API with channel: 'msedge' to control the installed Microsoft Edge browser. The essential sequence is to launch Edge, open a page, call page.screenshot(), and close the browser. Add fullPage: true for the entire scrollable document, or use a locator screenshot for one element.

What you need before capturing

  • Node.js installed on the machine that will run the script.
  • A project directory with Playwright installed: npm init -y, followed by npm install playwright.
  • A desktop Microsoft Edge installation. Playwright does not install branded Edge with its normal browser installation.
  • A URL that the machine can reach, plus any authentication or network access that page requires.

Playwright uses the chromium browser type because Microsoft Edge is Chromium-based. The branded browser is selected by passing channel: 'msedge'; omitting that option launches Playwright’s configured Chromium instead of Edge.

Install or verify Microsoft Edge for Playwright

Check that Edge launches normally for the same operating-system account that will run Node.js. If it is not installed, Playwright documents this command:

npx playwright install msedge

That command installs a Playwright-managed branded Edge channel. Playwright also recognizes channels such as msedge-beta and msedge-dev when those editions are available. In managed environments, enterprise browser policies, endpoint security, or a locked-down profile can prevent automation even when Edge opens interactively. Test with the intended account and policy set.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

For most general automation, Playwright recommends its bundled Chromium. Choose branded stable Edge when the result must reflect the public Edge browser, its media codecs, or enterprise policies. Edge’s newer headless implementation is closer to headed behavior, but it can still differ from Playwright’s default Chromium headless shell.

Capture a full-page screenshot with Node.js and Edge

Create capture.js with this CommonJS example:

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ channel: 'msedge' });
  const page = await browser.newPage();

  await page.goto('https://example.com', { waitUntil: 'load' });
  await page.screenshot({
    path: 'screenshot.png',
    fullPage: true
  });

  await browser.close();
})();

Run it with:

node capture.js

The file is written in the current directory. fullPage defaults to false, so setting it to true is the switch that captures the complete scrollable page rather than only the visible viewport.

Use waitUntil: 'load' when the document’s load event is a useful readiness point. For pages that render after JavaScript or data requests, add an explicit readiness condition instead of assuming that the load event means all content is visible:

await page.goto('https://example.com/dashboard', { waitUntil: 'domcontentloaded' });
await page.locator('[data-testid="dashboard"]')
  .waitFor({ state: 'visible', timeout: 30000 });
await page.screenshot({ path: 'dashboard.png', fullPage: true });

Choose what the screenshot contains

Visible viewport

Call page.screenshot({ path: 'viewport.png' }) without fullPage. The result is the current viewport, which is appropriate for responsive-layout checks and above-the-fold documentation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Entire scrollable document

Use fullPage: true. Playwright captures the document as if its scrollable content were laid out on a very tall screen. Very long or continuously loading pages can produce large files or take longer to finish; stop infinite feeds or wait for a stable content boundary when reproducibility matters.

One element

A locator screenshot is clipped to that element’s bounds:

await page.locator('.header').screenshot({ path: 'header.png' });

For a scrollable element, only the content currently scrolled into that element is included. Scroll it explicitly if the target is not visible.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Return bytes instead of writing a file

Omit path and Playwright returns an image buffer. This is useful when sending the result to object storage, an image processor, or an HTTP response:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const image = await page.screenshot({ type: 'png' });
require('node:fs').writeFileSync('from-buffer.png', image);

Control image format, scale, and visual stability

When a path is supplied, the extension selects the format. Playwright supports PNG, JPEG, and WebP. You can also set type explicitly when receiving bytes. JPEG and WebP support quality settings where applicable; PNG is lossless and has no quality setting.

await page.screenshot({
  path: 'product.webp',
  type: 'webp',
  quality: 85,
  scale: 'css'
});

scale: 'css' produces one output pixel per CSS pixel. scale: 'device' uses device pixels and can substantially increase dimensions on high-DPI configurations. Pick one deliberately when comparing images across machines.

For deterministic captures, consider the documented screenshot controls for animation, caret visibility, clipping, masks, transparent backgrounds, and image quality. Disable or mask timestamps, rotating banners, blinking cursors, and personalized content when those differences are noise rather than part of the test.

Set viewport, device characteristics, and page state

Configure the browser context before creating the page. A fixed viewport makes output dimensions repeatable:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const context = await browser.newContext({
  viewport: { width: 1440, height: 900 },
  deviceScaleFactor: 1,
  colorScheme: 'light'
});
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.screenshot({ path: 'desktop.png', fullPage: true });

Use colorScheme: 'dark' for a dark-mode render when the site honors the media preference. Context options can also carry locale, timezone, geolocation (with permission), cookies, extra headers, and a user agent when the page’s output depends on them. Supply only values appropriate for your test or capture; changing identity and locale can alter content and caching.

For a page that needs a login, authenticate through the normal flow or load a previously saved storage state. Do not put passwords or long-lived tokens directly in source code. If the target is behind a corporate proxy, configure the browser or process according to your organization’s policy.

A production-friendly capture script

This version adds a timeout, a readiness selector, an explicit viewport, and guaranteed cleanup:

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
const { chromium } = require('playwright');

async function main() {
  const browser = await chromium.launch({
    channel: 'msedge',
    headless: true
  });

  try {
    const context = await browser.newContext({
      viewport: { width: 1365, height: 768 },
      deviceScaleFactor: 1,
      colorScheme: 'light'
    });
    const page = await context.newPage();
    page.setDefaultTimeout(30000);
    page.setDefaultNavigationTimeout(60000);

    await page.goto('https://example.com', {
      waitUntil: 'domcontentloaded'
    });
    await page.locator('body').waitFor({ state: 'visible' });
    await page.screenshot({
      path: 'example-edge.png',
      fullPage: true,
      animations: 'disabled',
      caret: 'hide',
      scale: 'css'
    });

    await context.close();
  } finally {
    await browser.close();
  }
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Use ECMAScript modules instead by setting "type": "module" in package.json and replacing require with import. Keep the script’s API calls aligned with the Playwright version in your lockfile; screenshot and browser behavior can change between releases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make captures reliable and affordable to run

Wait for the content you actually need

Navigation events are not interchangeable. domcontentloaded is early, load waits for load-event resources, and networkidle waits for a quiet period but may never settle on applications with polling or analytics. A specific selector, a known response, or a short deliberate delay is often more reliable than a global idle condition.

Control lazy images and long pages

Full-page capture can trigger lazy loading as Playwright scrolls. Pages with endless scrolling, sticky elements, or animations may still change while the image is assembled. Use a bounded test page, disable animation where possible, and capture a locator when only a component is required.

Reuse a browser for batches

Launching Edge is more expensive than opening another page. For multiple URLs, launch once, create a context or page per job, close each page, and close the browser after the batch. Limit concurrency to what the machine’s CPU, memory, and network can sustain; excessive parallel pages cause timeouts and unstable rendering.

Keep output predictable

Use fixed viewport and device-scale settings, a stable locale and timezone, deterministic test data, and a consistent Edge channel. Store the Playwright version and Edge version with your build so a browser update does not silently change pixels.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting Edge screenshots

“Executable doesn’t exist” or Edge cannot launch

Install branded Edge or run npx playwright install msedge. Confirm that the command runs under the same user and environment as Node. If an enterprise policy blocks automation, ask the administrator for an approved configuration or use Playwright’s bundled Chromium where branded Edge is not a requirement.

The script opens Chromium instead of Edge

Check that the launch call is chromium.launch({ channel: 'msedge' }). The chromium import identifies the engine API; the channel value selects branded Edge.

Only the top of the page appears

That is the default viewport behavior. Add fullPage: true to page.screenshot. If you are capturing a locator, remember that the locator method captures its element bounds, not the entire document.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Dynamic content is missing

Wait for a meaningful selector or application state after navigation. Increase the navigation or locator timeout only after identifying the actual slow operation. A permanently polling page may never satisfy networkidle, so use a selector or response-based condition instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Images, fonts, or layout differ between runs

Check network access, authentication, viewport, device scale, locale, timezone, and Edge version. Disable animations and hide volatile elements with the documented masking or CSS techniques. If the page is personalized, use a controlled storage state.

Headless and headed results differ

Try a headed run for diagnosis by setting headless: false. Branded Edge’s headless implementation can behave differently from Playwright’s default Chromium headless shell. Compare the same channel, viewport, and policies before treating a pixel difference as an application defect.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server when you want a clean capture without maintaining Playwright and Edge. One GET request returns PNG, JPEG, WebP, or a PDF. Before capture it accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result.

It also supports full-page and CSS-selector captures, dark mode, device presets and custom viewports, retina scale, PDF paper and page controls, HTML/CSS rendering, custom JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage data, and an OpenAPI specification. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

See the ScreenshotNeo API documentation for authentication and parameters. This cURL request saves a WebP capture:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The equivalent Python request is:

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)

And in Node.js:

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 each month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account to try it.

FAQ

Can I use a locally installed Edge profile?

Use a dedicated automation context rather than your everyday profile. A separate context avoids leaking personal cookies, extensions, and state into repeatable captures.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Does full-page mode create a PDF?

No. page.screenshot creates an image. Use a PDF workflow when you need paginated paper dimensions, margins, orientation, or page ranges.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does a locator screenshot show only part of a scrollable widget?

Locator screenshots use the element’s bounds and current scroll position. Scroll the widget to the desired position or capture a specifically sized wrapper if the complete internal content is required.

Should I choose CSS or device scale?

Choose CSS scale for stable, compact comparisons across machines. Choose device scale when you need the pixels a high-DPI display would produce and can accept larger files.

Frequently Asked Questions

Can I use a locally installed Edge profile?

Use a dedicated automation context rather than your everyday profile. A separate context avoids leaking personal cookies, extensions, and state into repeatable captures.

Does full-page mode create a PDF?

No. page.screenshot creates an image. Use a PDF workflow when you need paginated paper dimensions, margins, orientation, or page ranges.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does a locator screenshot show only part of a scrollable widget?

Locator screenshots use the element’s bounds and current scroll position. Scroll the widget to the desired position or capture a specifically sized wrapper if the complete internal content is required.

Should I choose CSS or device scale?

Choose CSS scale for stable, compact comparisons across machines. Choose device scale when you need the pixels a high-DPI display would produce and can accept larger files.

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.