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

To screenshot a paywalled page you’re authorized to view, sign in through the site’s normal login flow with Playwright, verify that the sign-in succeeded, open the target page, confirm its content is visible, and then capture the viewport, an element, or the full page. Playwright can reuse saved authentication state, but it cannot grant access your account does not have.

Set up Playwright and keep authentication state private

The example below uses Node.js and Playwright’s library. Install it in your project, then create an authentication directory and exclude it from version control. Playwright’s authentication guide recommends saving state under playwright/.auth and adding the directory to .gitignore; the file can contain cookies and headers that could impersonate your account (Playwright authentication).

npm install playwright
npx playwright install chromium
mkdir -p playwright/.auth
echo 'playwright/.auth/' >> .gitignore

Use an account and access method authorized for the page. Do not commit the saved state file, share it as an ordinary screenshot artifact, or leave it in a location accessible to others.

Sign in, verify access, and capture the page

Save the following as capture-paywalled-page.mjs. Set LOGIN_URL, TARGET_URL, and the selectors to match the site. The script signs in through the normal form, waits for a post-login condition, saves state, opens the target in a context using that state, checks for the page content, and captures a full-page PNG.

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.
#1 Best Overall
Dell Optiplex 3060 Desktop Computer | Intel i5-8500 (3.2) | 32GB DDR4 RAM | 1TB SSD Solid State | Built in WiFi | Bluetooth | Windows 11 Professional | Home or Office PC (Renewed)
  • [INTEL POWERED CONTENT] - Built with a 8th Generation Hexa-Core Intel i5 and 32GB of DDR4 RAM; Modern, Windows 11 ready, with 4K support, Executive multitasking, media streaming and smooth, multi-tab web browsing; Perfect as an all-purpose multimedia computer; built for content creators; Plenty of RAM and Mass storage for photo and video editing powered by Intel HD 630
  • [LATEST WIRELESS TECH] - This Dell Desktop Computer easily connects to the internet through the Built In WiFi / Bluetooth
  • [SOLID STATE STORAGE] - This Dell Computer setup comes with an ultra-fast 1TB Solid State Drive (SSD); Setup as the primary boot device; Boot and load programs with lightning speed ; Additional expansion available
  • [BUY & OWN WITH CONFIDENCE] - From the world's largest Microsoft Authorized Refurbisher; Quality Guarantee and Free Tech Support; Award-winning Customer Service; | Support Sustainable Business
  • [MODERN HI-SPEED PORTS] - USB 3.0 (x4) | USB 2.0 (x4) | DisplayPort (x1) | HDMI Port (x1) | Audio Combo Jack (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)
import { chromium } from 'playwright';

const LOGIN_URL = 'https://example.com/login';
const TARGET_URL = 'https://example.com/article';
const AUTH_FILE = 'playwright/.auth/user.json';

const browser = await chromium.launch({ headless: true });
const context = await browser.newContext();
const page = await context.newPage();

try {
  await page.goto(LOGIN_URL, { waitUntil: 'domcontentloaded' });
  await page.locator('input[name="email"]').fill(process.env.SITE_EMAIL ?? '');
  await page.locator('input[name="password"]').fill(process.env.SITE_PASSWORD ?? '');
  await page.locator('button[type="submit"]').click();

  // Replace this with a reliable site-specific signed-in condition.
  await page.waitForURL('**/account/**', { timeout: 30000 });
  await page.getByRole('link', { name: /account|profile/i }).waitFor({ state: 'visible' });

  await context.storageState({ path: AUTH_FILE });
  await context.close();

  const authenticatedContext = await browser.newContext({ storageState: AUTH_FILE });
  const article = await authenticatedContext.newPage();
  await article.goto(TARGET_URL, { waitUntil: 'domcontentloaded' });

  // Replace with a selector for content that should appear for an entitled reader.
  await article.locator('article').waitFor({ state: 'visible', timeout: 30000 });
  await article.screenshot({ path: 'paywalled-page.png', fullPage: true });
  await authenticatedContext.close();
} finally {
  await browser.close();
}

Provide credentials through environment variables rather than writing them into the script. For example, set SITE_EMAIL and SITE_PASSWORD in your shell or a secret manager before running node capture-paywalled-page.mjs. The selectors and post-login URL in this example are placeholders for the site’s actual login interface; they are not universal.

Make the login check site-specific

A click on the submit button does not prove sign-in worked. Use a condition that only appears after successful authentication, such as a known account URL, a signed-in navigation item, or a page element visible to logged-in readers. Sites may redirect, delay setting cookies, or require an additional verification step, so wait for the expected condition before saving state. If the check fails, stop rather than capturing a login or subscription prompt as if it were the article.

Rank #2
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
  • Model: Dell OptiPlex 7050 Small Form Factor (SFF)
  • Processor: Intel Core i7-7700 3.60 GHz
  • Memory: 32GB DDR4 Ram
  • Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
  • Operating System: Windows 11 Pro (64-bit)

Verify the target page separately

Authentication state is not proof that the account can access every page. The target may require a separate subscription, institutional sign-in, or another site-specific entitlement. Wait for a distinctive content selector, and inspect the page if the selector times out. Do not treat a visible URL alone as evidence that the protected article loaded.

Reuse saved login state safely

Playwright browser contexts are isolated. A later run can start a new context with the saved state, as the capture script does with browser.newContext({ storageState: AUTH_FILE }). State can expire or be revoked; if the site sends the browser back to login or the expected article content is absent, sign in again and refresh the state file. Playwright documents cookies, local storage, IndexedDB, and passkey (WebAuthn) authentication as relevant to authentication-state handling (authentication guide).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
HP All-in-OneDesktop Computer, 16GB DDR5 RAM, Intel Quad-Cores, 128GB SSD, WiFi6, Keyboard & Mouse, Windows 11
  • IMMERSIVE 24 INCH DISPLAY: Experience stunning clarity on a Full HD IPS screen with ultra-thin bezels, offering a 90% screen-to-body ratio that makes everything from spreadsheets to streaming come alive with vibrant colors and crisp details.
  • POWERFUL INTEL PROCESSING: Tackle demanding tasks with ease thanks to the Intel processor and 16GB of high-speed memory, delivering smooth performance whether you're multitasking between applications or running productivity software.
  • GENEROUS STORAGE: Store all your important files, photos, and programs with blazing-fast solid state drive technology that ensures quick boot times, rapid file access, and plenty of space for your digital life.
  • ENHANCED PRIVACY AND COLLABORATION: Work confidently with the pop-up privacy camera that tucks away when not in use, plus dual microphones with noise reduction for crystal-clear video calls that keep you connected professionally.
  • ECO-CONSCIOUS DESIGN: Feel good about your purchase with an EPEAT Gold registered and ENERGY STAR certified computer that combines premium performance with responsible environmental manufacturing practices.

Storage-state options vary by installed Playwright version. IndexedDB support was added in v1.51, and credentials support in v1.61; check the version and API documentation before relying on those newer options (BrowserContext storageState API). Standard storage-state reuse does not automatically persist sessionStorage. If the application relies on it, Playwright’s authentication guide describes a manual save-and-restore approach using an initialization script. Keep any such script scoped to the expected origin.

Choose the screenshot mode that fits the record

Playwright’s page.screenshot() captures the visible viewport by default. Choose a mode based on what the record needs to show (Playwright screenshots guide).

Rank #4
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
  • This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high-performance bar may offer Certified Refurbished products on Amazon.com.
  • Dell Optiplex 3050 SFF Desktop computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD
  • Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.
  • Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
  • Support 4K (3840x2160) Dual display, makes it easy to connect two monitors at the same time, and you can expand working Windows, mirror content, or expand a single window across multiple monitors.
Mode What it records Example
Viewport The browser’s currently visible page area. await page.screenshot({ path: 'viewport.png' });
Full page The page’s full scrollable height, including content below the fold. await page.screenshot({ path: 'full.png', fullPage: true });
Element A selected component or region. await page.locator('article').screenshot({ path: 'article.png' });
Higher device-pixel detail A screenshot rendered at a higher device scale factor when the context is configured for it. const context = await browser.newContext({ deviceScaleFactor: 2 });

A viewport capture is a record of what was visible at that moment; a full-page capture is useful for longer material but can be cumbersome to inspect in one image. Element capture narrows the image to the relevant region. Device-pixel scaling can increase pixel detail and output size.

Handle common failures

  • The login wait times out: the success URL or signed-in selector may not match the site, credentials may be invalid, or the site may require an extra verification step. Inspect the flow and replace the check with a condition that reflects successful sign-in.
  • The target shows a paywall or login prompt: saved state may have expired, the account may lack access, or the target may require an additional sign-in path. Re-authenticate and confirm the account’s entitlement through the site’s normal interface.
  • The content selector times out: the page may still be loading, the selector may be wrong, or the content may not be available to the account. Check the rendered page and use a selector tied to the actual article content.
  • The site depends on session storage: a regular storage-state file does not preserve it automatically. Use the documented manual initialization-script pattern only if required, and restrict it to the site origin.
  • The saved state stops working: sessions can expire or be revoked. Repeat the normal login and replace the local state file; keep it out of source control.
  • The screenshot is unexpectedly large or hard to review: full-page capture includes below-the-fold content. Capture the viewport or a specific element when that is the evidence needed.
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 is a screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF, but it does not take over an authenticated Playwright session; use Playwright when access depends on a logged-in account. ScreenshotNeo accepts the cookie/consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture, with each step optional. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. See ScreenshotNeo and the API documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Sign up for 1,000 free screenshots a month with no card.

Best Value
Dell Windows 11 Desktop Computer OptiPlex 5060 | Intel Core i5-8500 Six Core (4.3GHz Turbo) | 16GB DDR4 RAM | 500GB SSD Solid State + 1TB HDD | WiFi + Bluetooth | Home or Office PC (Renewed)
  • Connectivity: Includes WiFi, Bluetooth, and LAN for wireless and wired connections
  • Memory: Features 16GB DDR4 RAM for smooth multitasking and performance
  • Storage: Combines 500GB SSD and 1TB HDD for ample storage space
  • Graphics: Integrated Intel UHD Graphics 630 for crisp visuals and video playback
  • Design: Sleek desktop tower with black color and slim profile for modern look

Frequently Asked Questions

Does Playwright unlock a paywalled page?

No. It reuses browser authentication state for an account; the site decides whether that account is entitled to the page.

Can I reuse the saved state in another Playwright run?

Yes. Create a browser context with the saved file as its storageState, provided the session remains valid.

Quick Recap

Bestseller No. 2
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
Model: Dell OptiPlex 7050 Small Form Factor (SFF); Processor: Intel Core i7-7700 3.60 GHz; Memory: 32GB DDR4 Ram
$399.99
Bestseller No. 4
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.; Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
$179.98
Bestseller No. 5
Dell Windows 11 Desktop Computer OptiPlex 5060 | Intel Core i5-8500 Six Core (4.3GHz Turbo) | 16GB DDR4 RAM | 500GB SSD Solid State + 1TB HDD | WiFi + Bluetooth | Home or Office PC (Renewed)
Dell Windows 11 Desktop Computer OptiPlex 5060 | Intel Core i5-8500 Six Core (4.3GHz Turbo) | 16GB DDR4 RAM | 500GB SSD Solid State + 1TB HDD | WiFi + Bluetooth | Home or Office PC (Renewed)
Connectivity: Includes WiFi, Bluetooth, and LAN for wireless and wired connections; Memory: Features 16GB DDR4 RAM for smooth multitasking and performance
$255.00

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.

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