Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Use Playwright’s Node.js API to launch branded Microsoft Edge by setting channel: 'msedge', navigate to a URL, and call page.screenshot(). Add fullPage: true for the whole scrollable document; leave it out for the visible viewport. If Edge is not available on the machine, Playwright documents npx playwright install msedge as the installation command.
Set up Playwright and branded Microsoft Edge
Playwright’s browser type is chromium because Microsoft Edge is Chromium-based. The browser channel is what selects the branded Edge application: channel: 'msedge'. Without that option, you are not explicitly asking Playwright to launch branded Edge.
Install the Node.js package
From your project directory, add Playwright:
npm install playwright
Playwright does not install branded Edge by default. If Edge is unavailable, run the documented browser installation command from the project directory:
Recommended Free Tools
npx playwright install msedge
This setup relies on the machine being able to install and launch Edge. On a managed work computer, browser installation or automation may be restricted by enterprise policy; an installation command cannot override those policies.
#1 Best Overall
- 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
Save a full-page screenshot
This CommonJS script opens the example site in Edge, waits for the page load event, captures the full page as a PNG, and closes the browser even if navigation or capture fails. Save it as screenshot.js and run node screenshot.js.
const { chromium } = require('playwright');
(async () => {
let browser;
try {
browser = await chromium.launch({ channel: 'msedge' });
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://example.com', {
waitUntil: 'load',
timeout: 60_000,
});
await page.screenshot({
path: 'screenshot.png',
fullPage: true,
});
} finally {
if (browser) {
await browser.close();
}
}
})();
Change the URL and output filename for your task. The timeout here limits navigation waiting; it is not a guarantee that every site has finished its own asynchronous work. If the target adds content after its load event, use an appropriate page-specific wait, described below.
Choose the capture area and output
Viewport, full page, or one element
- Viewport: omit
fullPage, or set it tofalse. The screenshot covers the visible browser viewport. - Full scrollable document: set
fullPage: true. Playwright captures the page as if the full scrollable document fit on a very tall screen. This does not mean that every independently scrolling container inside the page is expanded. - One element: take a locator screenshot. It is clipped to the element’s bounds; for a scrollable element, only the content currently scrolled into view is included.
// Visible viewport
await page.screenshot({ path: 'viewport.png' });
// Whole scrollable document
await page.screenshot({ path: 'full-page.png', fullPage: true });
// One element
await page.locator('.header').screenshot({ path: 'header.png' });
Use a selector that identifies a single intended element. If the locator does not resolve to an element, or identifies an unexpected part of the page, adjust the selector before capturing.
PNG, JPEG, WebP, and image bytes
When you provide a path, the file extension determines the image format. Playwright supports PNG, JPEG, and WebP. If a later step needs the image in memory instead of a file, omit path; the screenshot call returns a buffer:
Rank #2
- 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
const imageBytes = await page.screenshot({ fullPage: true });
// Pass imageBytes to the next step in your application.
Choose a format based on what will consume the result: PNG is useful when you need lossless output, while JPEG and WebP can be suitable when a smaller image matters. Image dimensions and resulting file size depend on the page, capture scope, and scale.
CSS pixels or device pixels
The screenshot option scale controls output scale. css produces one output pixel per CSS pixel; device uses device pixels and may create a substantially larger high-DPI image. Use CSS scale when predictable CSS-sized output matters, and device scale when you specifically need device-pixel detail. Do not compare captures made at different scales as though their pixel dimensions were equivalent.
Wait for the content you actually need
A successful navigation does not necessarily mean that every image, advertisement, client-rendered widget, or other late content is ready. The example waits for the browser’s load event, but a page that populates its main content later may need a more specific synchronization point.
Free tools Windows power users keep installed
One-click scans. No signup required.
- Wait for a relevant selector when the required content has a reliable element that appears only after rendering.
- Use a deliberate delay only when the site has no useful readiness signal; fixed delays can make runs slower and still fail to predict variable network or application behavior.
- For pages that load images as the user scrolls, a full-page option is not a substitute for confirming that the site has loaded the content required in the final image.
Choose a wait based on the target site, not on a universal assumption that a single navigation event means “visually complete.” Keep navigation and any extra wait bounded so a stalled page does not leave the job running indefinitely.
Rank #3
- 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.
Make captures repeatable and suitable for review
For a one-off reference image, defaults may be enough. For comparisons, tests, or downstream image processing, control the capture conditions that matter to your use case. Playwright’s screenshot API documents animation control, caret behavior, clipping, masks, background transparency, and image quality settings. These options change what the output represents, so choose them intentionally rather than assuming two default captures will always be identical.
- Animation: control animations when motion would make successive screenshots differ.
- Caret: hide or otherwise control the text insertion caret if it would appear inconsistently in an input field.
- Clipping and masks: capture a defined region or obscure selected elements when only part of a page belongs in the artifact.
- Background and quality: choose transparency or compression settings only when the target format and downstream use support them.
For a full-page image, consider whether the page is unusually long or contains large media. More captured pixels generally mean more image data to encode and handle, and very tall pages can be costly for memory and downstream processing. If you only need a component, a locator screenshot avoids capturing unrelated page content.
Choose between Edge and Playwright’s bundled Chromium
Use msedge when the task needs the branded Edge browser—for example, when the current public Edge browser, its media codecs, or enterprise browser policies are part of what you need to reflect. Playwright documents channels including msedge, msedge-beta, and msedge-dev, and provides a CLI installation route for Edge.
For most general browser automation, Playwright recommends its bundled Chromium. Its newer Edge headless implementation is closer to headed mode, but can behave differently in some cases from Playwright’s default Chromium headless shell. A screenshot made in one environment is therefore not automatically a pixel-identical representation of another browser mode, machine, or policy configuration.
Rank #4
- 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
Troubleshoot common failures
Playwright cannot launch Edge
Likely causes: branded Edge is not installed, the channel is unavailable on that machine, or organizational browser policy prevents automation. Confirm that the launch options include channel: 'msedge'. If Edge is absent, try npx playwright install msedge where permitted. On a managed device, ask the administrator whether Edge automation is allowed. If branded Edge is not a requirement, use Playwright’s bundled Chromium instead of selecting the Edge channel.
Navigation times out or the image is blank
Check that the URL is reachable from the machine running Node.js and that the site has not stalled, redirected unexpectedly, or returned a browser check. A navigation timeout means the selected navigation condition was not reached in time; it does not establish that the site itself is permanently unavailable. Check the destination and the wait condition, and use a page-specific readiness signal if required content loads after navigation.
The screenshot misses content or shows an unexpected region
Check whether you requested the viewport or full page, whether the desired content is inside a nested scrollable region, and whether the locator matches the intended element. A locator screenshot captures its element bounds, not all the hidden contents of a scrollable element. For lazy-loaded page content, confirm the site has actually loaded what you expect before capturing.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →The output is too large or unsuitable for comparison
Review the capture scope and scale. Device-pixel scale can produce substantially larger output than CSS-pixel scale; a full-page capture also includes more pixels than a viewport capture. For comparisons, keep browser channel, viewport, scale, wait condition, and relevant screenshot controls consistent. A difference in any of these conditions can change the image independently of the page change you are investigating.
Best Value
- 【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.
Or skip the browser setup
If you need an API rather than a locally launched browser, ScreenshotNeo takes a screenshot or PDF through one GET request. Its API also provides clean-shot handling: it 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 cost nothing, and responses identify the page verdict and billing status in X-Page-Verdict and X-Billed headers. An MCP server exposes take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients.
Example request (replace the key with your API key):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for parameters and response details. The service also supports options such as full-page and element captures, viewport and device presets, PDF output, custom CSS or JavaScript, waits, headers and cookies, caching, asynchronous jobs, bulk capture, and a usage API.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPlans are monthly: Free includes 1,000 shots at no charge and no card; paid plans start at $5 for 3,000 shots. The listed plans are:
| Plan | Monthly price | Shots per month |
|---|---|---|
| Free | $0 | 1,000 |
| Starter | $5 | 3,000 |
| Growth | $15 | 15,000 |
| Pro | $39 | 60,000 |
| Scale | $99 | 250,000 |
| Business | $249 | 1,000,000 |
Yearly billing gives two months free, and every feature is available on every plan. Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Can I save a screenshot buffer to a database or object store instead of a local file?
Yes. Omitting path returns image bytes as a buffer; your application can pass those bytes to a storage client or another processing step.
Should I select Edge for every automated screenshot?
No. Choose branded Edge when matching Edge-specific behavior matters. For general automation, Playwright recommends its bundled Chromium; the two headless environments can differ.
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.

