What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Playwright captures the page represented by the Page object on which you call screenshot(). To capture a particular tab, retain or identify that tab’s Page object and call intendedPage.screenshot()—not a variable that still points to another page. Bringing the tab to the foreground is not required.
How Playwright chooses what to screenshot
A Playwright Page represents one browser tab or popup. A BrowserContext can hold several pages, and each is independent. The screenshot call acts on the specific Page object you invoke it on; it does not choose a tab based on which one appears visually foregrounded in a browser window. Playwright’s Pages guide notes that bringing a page to the front is not required.
As an Amazon Associate I earn from qualifying purchases.
That means the usual fix is to correct the page reference, not to call bringToFront(). Keep distinct references when a test opens multiple pages, and confirm the target’s URL and expected content before capturing.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsCapture the page you created
Keep using the same Page object for navigation, checks, and the screenshot:
#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
const context = await browser.newContext();
const examplePage = await context.newPage();
await examplePage.goto('https://example.com');
await examplePage.screenshot({ path: 'example.png' });
If your test opens another page and that is the intended target, capture through that page’s own reference instead. Descriptive names such as checkoutPage and confirmationPopup make accidental reassignment easier to spot.
Capture a popup instead of the original page
Register the popup wait before the action that opens it. Then wait for the popup to reach the condition your application needs before taking the screenshot:
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 popupPromise = page.waitForEvent('popup');
await page.getByRole('link', { name: 'Open report' }).click();
const reportPopup = await popupPromise;
await reportPopup.waitForLoadState();
await reportPopup.screenshot({ path: 'report.png' });
The popup event yields a new Page object. The event can arrive while the page is still loading, so the event alone does not establish that the desired content is ready. Choose a readiness check suitable for the site—for example, a relevant load state or an assertion on a unique report heading. See the BrowserContext API for the page event and popup behavior.
Outdated 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 matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11You can also listen for the context’s page event when the test needs to observe pages more generally. That event includes popups; identify the page you want and wait for its navigation or expected content before capture rather than assuming the first event is ready.
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.
Choose among pages already open
When a context intentionally contains several pages, inspect them and select by a stable condition such as URL or unique page content. Avoid selecting the final array entry unless your test controls and verifies that ordering.
const pages = context.pages();
const reportPage = pages.find(page => page.url() === 'https://example.com/report');
if (!reportPage) {
throw new Error('Report page was not found');
}
await reportPage.getByRole('heading', { name: 'Report' }).waitFor();
await reportPage.screenshot({ path: 'report.png' });
Match against the URL your application actually uses, including any redirects or dynamic path segments. If URL alone is not unique, combine it with a locator or another assertion that identifies the intended page.
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
Verify the page before changing the capture
Log or assert the candidate page’s URL and a distinctive element before the screenshot. If both point to the expected page but the image still looks wrong, page selection may not be the cause.
Free tools Windows power users keep installed
One-click scans. No signup required.
- Wrong URL or content: trace which Page object the test navigated and which one it passed to
screenshot(). - Right page, incomplete content: wait for the relevant navigation, selector, or application state. A page event can occur before rendering is complete.
- Only the visible area appears: set
fullPage: trueto capture the full scrollable page. This changes the capture area, not the selected tab.
await intendedPage.screenshot({ path: 'full-page.png', fullPage: true });
The Page API also supports screenshot options such as masking, animation handling, and output format; consult the Page API for the options available in your installed Playwright version.
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.
Separate page-selection mistakes from visual differences
If the URL and expected content are correct, compare the capture environment before concluding that Playwright chose another tab. Playwright’s visual comparisons guide identifies host operating system, browser version, settings, hardware, power source, and headless mode as factors that can affect rendering. Keep those conditions consistent when investigating screenshot differences.
Troubleshooting checklist
- Screenshot shows the original page after a popup opened: wait for the popup and call
screenshot()on the returned popup Page. - A variable points to an unexpected page: use separate, descriptive Page variables; search for reassignments and shared mutable state.
- The popup is blank or partially rendered: wait for the required load state or assert the popup’s unique content before capturing.
- The target is one of several existing pages: select it by a verified URL or page-specific content, not assumed array position.
- The image is too short: use
fullPage: trueif the intended output includes content beyond the viewport. - The correct content looks different across runs: compare browser engine and version, host OS, settings, hardware, power source, and headless mode.
Or skip the browser setup
If you need a screenshot from a URL without managing Playwright pages and browser setup, ScreenshotNeo provides a website screenshot API. One GET request can return an image or PDF. For example, using cURL:
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 the request options. ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. An MCP server offers take_screenshot, get_page_info, and capture_pdf tools for AI agents and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month without a 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.




