Use browser automation to sign in once, save the authenticated browser state, then restore it while visiting and capturing each URL. With Playwright, this works when the target site accepts the saved state and your account is authorized to access every page. The state file is sensitive: it may contain credentials that can impersonate your account.
How the workflow works
Single sign-on (SSO) usually redirects a browser through an identity provider before returning it to the application. Rather than repeat that flow for every screenshot, complete the approved sign-in once and save the browser context’s state after authentication has settled. Then initialize a fresh context from that state, navigate to each target URL, and capture each page.
- Choose authorized URLs. Make a list of destinations and use an account permitted to access each one. Different routes or domains may have different access policies.
- Sign in through the normal flow. Complete any identity-provider steps required for the account. Do not assume multi-factor authentication (MFA), CAPTCHA, or conditional-access checks can or should be skipped.
- Wait for authentication to finish. Redirects can set cookies over multiple steps. Wait for the final URL or an element that appears only after successful sign-in before saving state.
- Save the state privately. Keep the file outside version control and restrict access to it.
- Restore state and capture each page. Open each destination in the authenticated context, wait for the intended page state, and save a distinct screenshot.
- Review the images. Check that each capture shows the expected signed-in page rather than a login, access-denied, redirect, or loading screen.
Playwright documents this save-and-reuse approach in its authentication guide and provides page screenshot functionality in its visual comparisons documentation.
Runnable Playwright example
The following Node.js example opens a browser for interactive sign-in, saves authenticated state, then uses it to capture a list of pages. Install Playwright with npm install playwright and install its Chromium browser with npx playwright install chromium. Replace the example URLs and the post-login URL or selector with values for your application.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute#1 Best Overall
- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
const { chromium } = require('playwright');
const targets = [
'https://app.example.com/reports',
'https://app.example.com/settings'
];
(async () => {
const browser = await chromium.launch({ headless: false });
// First run: complete the approved SSO sign-in in this browser.
const loginContext = await browser.newContext();
const loginPage = await loginContext.newPage();
await loginPage.goto('https://app.example.com/login');
// Complete sign-in, including any required interactive steps.
// Wait for an authenticated URL or UI element before saving state.
await loginPage.waitForURL('**/home', { timeout: 120000 });
await loginContext.storageState({ path: 'playwright/.auth/state.json' });
await loginContext.close();
// Restore the saved state for the capture run.
const context = await browser.newContext({
storageState: 'playwright/.auth/state.json',
viewport: { width: 1440, height: 1000 }
});
for (let i = 0; i < targets.length; i++) {
const page = await context.newPage();
await page.goto(targets[i], { waitUntil: 'domcontentloaded' });
// Prefer a meaningful app-specific ready condition where possible.
await page.locator('main').waitFor({ state: 'visible', timeout: 30000 });
await page.screenshot({ path: `screenshots/page-${i + 1}.png`, fullPage: true });
await page.close();
}
await context.close();
await browser.close();
})().catch(error => {
console.error(error);
process.exitCode = 1;
});
Create the playwright/.auth and screenshots directories before running this example. The URL pattern and main selector are application-specific; if the login completes at a different URL, change the wait condition to the actual final URL or use a locator for an authenticated interface element.
After the first successful run, avoid repeating the interactive sign-in on every batch: split setup from capture so the capture job reads the existing state file. Refresh the state by running the sign-in step again when the session expires. If sign-in relies on an API that your application supports and permits, Playwright also documents API-based authentication as an alternative pattern; it is not available for every SSO setup.
Rank #2
- 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
- 4GB DDR4 System Memory; 128GB Solid State Drive
- 11.6" HD (1366 x 768) Multi-Touch Display
- Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
- Windows 11 Pro
Protect the saved authentication state
Playwright warns: “The browser state file may contain sensitive cookies and headers that could be used to impersonate you or your test account.” Treat the file like a password: do not commit it, publish it, or place it in a shared artifact directory.
- Add
playwright/.authto.gitignore. - Limit file and job access to the people and systems that need it.
- Remove the state when it is no longer needed, and regenerate it through the permitted sign-in flow when it expires.
Know which browser storage is covered
Applications can keep authentication data in cookies, local storage, IndexedDB, or passkeys (WebAuthn). Playwright’s storage-state workflow supports the documented categories, but the site must accept the restored state. Session storage is different: it is tied to a domain and does not persist across page loads. Playwright does not provide built-in session-storage persistence, though its authentication guide describes a custom save-and-restore approach.
Rank #3
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
MFA, CAPTCHA, conditional access, and identity-provider rules vary by organization and application. A saved session may avoid a new login only while the site accepts it; it is not a universal workaround for an interactive challenge. Follow the site owner’s rules whenever a challenge appears.
Make captures consistent and verifiable
For reliable comparisons, keep the browser version, host operating system, browser settings, hardware, power conditions, and headless mode consistent. Playwright notes that these factors can change rendered screenshots. Its visual comparisons documentation says screenshots are PNG by default; WebP can be requested by using a filename with the .webp extension.
Rank #4
- EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
- 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
- RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
- ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
- LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.
Use waits that reflect the page’s actual readiness. A navigation event alone may happen before client-rendered content, images, or charts are ready. Wait for a known page element or application-specific condition, then inspect the image outputs. If captures are automated tests rather than files for manual review, Playwright’s PageAssertions screenshot API offers a test-runner-oriented assertion option; it is distinct from simply saving a screenshot.
Troubleshooting
- A capture shows the login page. The state may have been saved before redirects or cookies settled, may have expired, or may not be accepted for that target. Wait for the authenticated UI before saving, sign in again, and verify that the account can access that URL.
- One URL works but another does not. Check whether it is on a different domain, requires a different permission, or uses a separate authentication policy. Do not assume one application’s state authorizes every destination.
- A session works in the first context but not after restore. Check the storage mechanism used by the application. Session storage needs custom handling; confirm the relevant data is present in the restored page and follow Playwright’s documented approach if needed.
- The sign-in wait times out. The final URL may differ from the example, or an MFA or other interactive step may still be pending. Update the wait condition to match the successful destination or authenticated element, and complete required challenges normally.
- The page is blank or incomplete in the image. Wait for the element or content that signals the page is ready, and check for access errors or failed navigation before saving. A screenshot can faithfully capture an unfinished page.
- Images differ across runs. Stabilize the browser and host environment, viewport, page state, and timing. Review the actual output rather than assuming identical markup guarantees identical pixels.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. For an authorized page that is publicly reachable to the API, one GET request can return an image or PDF; it does not reuse your private SSO session, so it is not a substitute for authenticated browser state on protected pages.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Best Value
- WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
- 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
- 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
- CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
- LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
See the ScreenshotNeo documentation for request options. Example cURL request:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://app.example.com/reports -o shot.webp
ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and responses identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Can one saved SSO state work for more than one URL?
It can, when the target application accepts that state and the account has permission to open each destination.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Does saving Playwright state bypass MFA or CAPTCHA?
No universal bypass is established; follow the application’s and organization’s required sign-in process.
Can I use ScreenshotNeo for a page behind SSO?
ScreenshotNeo’s URL-based request does not reuse a private browser session. Use the Playwright workflow for protected pages that require your authenticated state.
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.

