Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC 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 & 11Authenticate once in a Playwright setup project, save the browser context with storageState, and let dependent projects load that state before creating page-object-model (POM) fixtures. Keep authentication lifecycle code out of the POM: a POM should expose application behavior and locators, while configuration or fixtures provide a page that already has the correct role and account.
Use one shared account only when tests can run concurrently without changing conflicting server data and the login is not browser-specific. If tests mutate shared data, provision separate accounts and generate state per worker.
The architecture: setup, state, context, then POM
Playwright’s authentication guide describes a setup project that logs in once and writes a state file. Test projects depend on that setup project and point use.storageState at the file. When a test starts, Playwright creates its browser context from the saved cookies and local storage; your POM then wraps the resulting page.
This boundary keeps responsibilities clear. The POM guide says page objects represent a part of the web application, centralize selectors and provide a higher-level API. They should not decide when credentials are entered or where state files are stored.
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
- Setup or fixture: authenticate, choose the account and role, create contexts and manage state-file lifecycle.
- Configuration: declare project dependencies and the state file used by each project.
- POM: locate elements and perform domain actions on an already authenticated page.
See the official guidance for authentication, page object models and test options.
Authenticate in a setup project
Create a setup test that performs your application’s real login flow. Replace the routes, labels and selectors below with those used by your application. Wait for a durable signed-in condition, such as a post-login URL or account control, before saving state.
import { test as setup, expect } from '@playwright/test';
import path from 'node:path';
const authFile = path.join(__dirname, '../playwright/.auth/user.json');
setup('authenticate', async ({ page }) => {
await page.goto('https://app.example.test/login');
await page.getByLabel('Email').fill(process.env.E2E_EMAIL!);
await page.getByLabel('Password').fill(process.env.E2E_PASSWORD!);
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page).toHaveURL(/dashboard/);
await expect(page.getByRole('button', { name: /account/i })).toBeVisible();
await page.context().storageState({ path: authFile });
});
Do not use credentials from documentation examples in a real suite. Keep them in your CI secret store or environment variables, and make the final assertion specific enough to prove that authentication completed rather than merely that navigation ended.
Make dependent projects load the saved state
Declare the setup project first, then make browser projects depend on it. The dependency causes the setup test to run before the dependent projects.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesimport { defineConfig, devices } from '@playwright/test';
import path from 'node:path';
const authFile = path.join(__dirname, 'playwright/.auth/user.json');
export default defineConfig({
testDir: './tests',
projects: [
{
name: 'setup',
testMatch: /.*\.setup\.ts/,
},
{
name: 'chromium-authenticated',
use: { ...devices['Desktop Chrome'], storageState: authFile },
dependencies: ['setup'],
},
{
name: 'firefox-authenticated',
use: { ...devices['Desktop Firefox'], storageState: authFile },
dependencies: ['setup'],
},
],
});
A single state file can be loaded by multiple browser projects only when the authentication is valid across those browsers. Browser-specific tokens, device-bound credentials or different security policies require separate setup files.
Expose authenticated POMs through fixtures
One role and one page
With storageState configured at project level, the built-in page fixture is already authenticated. Construct your POM from that page and expose it as a custom fixture.
Rank #2
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
import { test as base, expect } from '@playwright/test';
export class DashboardPage {
constructor(private readonly page: import('@playwright/test').Page) {}
async open() {
await this.page.goto('/dashboard');
}
async projectCount() {
return this.page.getByTestId('project-count').innerText();
}
}
type Fixtures = { dashboard: DashboardPage };
export const test = base.extend<Fixtures>({
dashboard: async ({ page }, use) => {
await use(new DashboardPage(page));
},
});
export { expect };
import { test, expect } from './fixtures';
test('shows the signed-in dashboard', async ({ dashboard }) => {
await dashboard.open();
await expect(await dashboard.projectCount()).toMatch(/\d+/);
});
Alternatively, instantiate new DashboardPage(page) directly inside a test. The fixture pattern is preferable when many tests need the same object because construction stays consistent and the test signature documents its dependencies.
Two roles in one test
For administrator-and-user scenarios, create separate browser contexts from separate state files. A POM wraps a page; the context’s state establishes its role.
Recommended Free Tools
import { test as base } from '@playwright/test';
import path from 'node:path';
import { AdminPage } from './pom/admin-page';
import { UserPage } from './pom/user-page';
type RoleFixtures = { admin: AdminPage; user: UserPage };
export const test = base.extend<RoleFixtures>({
admin: async ({ browser }, use) => {
const context = await browser.newContext({
storageState: path.join(__dirname, '../playwright/.auth/admin.json'),
});
try {
await use(new AdminPage(await context.newPage()));
} finally {
await context.close();
}
},
user: async ({ browser }, use) => {
const context = await browser.newContext({
storageState: path.join(__dirname, '../playwright/.auth/user.json'),
});
try {
await use(new UserPage(await context.newPage()));
} finally {
await context.close();
}
},
});
Never try to represent two roles with two POMs over the same page: cookies and local storage belong to its context, so the identities would not be independent.
Choose shared state or state per worker
One shared account
The basic approach is simplest when tests can run simultaneously without affecting one another through server-side changes. It also assumes authentication is not browser-specific. Read-only checks, isolated records and immutable fixtures are common examples.
One account per worker
If tests create, edit or delete shared records, use unique accounts. Playwright’s guide demonstrates worker-scoped state keyed by test.info().parallelIndex. Provision accounts such as e2e-worker-0, authenticate each worker once, and reuse only that worker’s file.
import { test as base } from '@playwright/test';
import path from 'node:path';
export const test = base.extend<{}, { workerStorageState: string }>({
workerStorageState: [async ({ browser }, use, workerInfo) => {
const file = path.join(__dirname, `../playwright/.auth/worker-${workerInfo.parallelIndex}.json`);
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://app.example.test/login');
await page.getByLabel('Email').fill(`e2e-worker-${workerInfo.parallelIndex}@example.test`);
await page.getByLabel('Password').fill(process.env.E2E_PASSWORD!);
await page.getByRole('button', { name: 'Sign in' }).click();
await page.context().storageState({ path: file });
await context.close();
await use(file);
}, { scope: 'worker' }],
storageState: async ({ workerStorageState }, use) => use(workerStorageState),
});
Worker isolation costs account provisioning and setup time, but prevents parallel workers and other team members from overwriting each other’s server data. A shared file is not a substitute for data isolation.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- 【Plug-and-Play Expandability】 With no software to install, just plug it in and the drive is ready to use in Windows(For Mac,first format the drive and select the ExFat format.
- 【Fast Data Transfers 】The external hard drives with the USB 3.0 cable to provide super fast transfer speed. The theoretical read speed is as high as 110MB/s-133MB/s, and the write speed is as high as 103MB/s.
- 【High capacity in a small enclosure 】The small, lightweight design offers up to 500GB capacity, offering ample space for storing large files, multimedia content, and backups with ease. Weighing only 0.35 Lbs, it's easy to carry "
- 【Wide Compatibility】Supports PS4 5/xbox one/Windows/Linux/Mac and other operating systems, ensuring seamless integration with game consoles,various laptops and desktops .
- Important Notes for PS/Xbox Gaming Devices: You can play last-gen games (PS4 / Xbox One) directly from an external hard drive. However, to play current-gen games (PS5 / Xbox Series X|S), you must copy them to the console's internal SSD first. The external drive is great for keeping your library on hand, but it can't run the new games.
UI login versus API login
If your application exposes a practical authentication endpoint, use APIRequestContext in setup and save its state. Playwright documents the state as interchangeable between APIRequestContext and BrowserContext, so a token or cookie obtained through the API can initialize browser tests.
import { test as setup, expect, request } from '@playwright/test';
import path from 'node:path';
setup('authenticate through API', async () => {
const api = await request.newContext({ baseURL: 'https://app.example.test' });
const response = await api.post('/api/login', {
data: { email: process.env.E2E_EMAIL, password: process.env.E2E_PASSWORD },
});
expect(response.ok()).toBeTruthy();
await api.storageState({ path: path.join(__dirname, '../playwright/.auth/api-user.json') });
await api.dispose();
});
API login can avoid fragile UI steps and is often faster, but only use it when the endpoint and security model are intended for this purpose. If login requires browser challenges, redirects or device checks, the UI flow may be the accurate setup.
What storageState includes—and what it does not
- The standard state file captures cookies and local storage.
- IndexedDB snapshots are supported by the BrowserContext API from Playwright v1.51 when the relevant option is enabled.
- Virtual WebAuthn credentials can be included through the credentials option from Playwright v1.61.
- Session storage is not automatically persisted. Playwright’s authentication guide demonstrates capturing it and injecting it with
context.addInitScript; session storage is domain-specific and does not survive page loads by itself.
Check the BrowserContext API reference for options supported by the Playwright version installed in your project. If an application stores its login material only in session storage, a normal storageState file will appear valid while tests still behave as logged out.
Protect and refresh authentication files
Playwright warns: “The browser state file may contain sensitive cookies and headers that could be used to impersonate you or your test account.” Store files under playwright/.auth, add that directory to .gitignore, and do not commit it even to a private repository.
# .gitignore
playwright/.auth/
If state does not need to survive between runs, write it under the test project’s output directory so Playwright can clean it before a run. Otherwise, regenerate it when tokens expire. In UI mode, setup projects do not run by default; run the setup test manually when the existing state has expired.
Performance and reliability practices
- Authenticate once per account or worker instead of logging in inside every test.
- Use stable post-login assertions, not arbitrary timeouts.
- Keep setup data deterministic and clean up records created by mutation tests.
- Use worker-specific accounts when parallelism changes shared server state.
- Separate browser projects when authentication is device- or browser-bound.
- Report the state-file path in CI logs without printing its contents or secrets.
Common failures and fixes
“Tests are logged out”
Verify that the setup project ran, the path is absolute or resolved from the expected directory, and the saved file contains cookies or local storage for the same origin used by the test. A redirect to a different domain can also leave the expected origin unauthenticated.
Rank #4
- 【Versatile Storage Expansion – For Gaming, Work & Everyday Use】 Running out of space on your PS5 or Xbox Series X/S? This external hard drive lets you store and play PS4 / Xbox One games directly, instantly freeing up your console’s internal storage for next‑gen titles. At the same time, it handles work file backups, media libraries, and cross‑device data transfers with ease. One drive, all your needs. *(Note: PS5 / Xbox Series X|S games cannot be run or stored directly from the external hard drive. However, by offloading your PS4 / Xbox One games, you can free up valuable space for newer titles.)*
- 【Patented Silicone Sleeve – Data Protection You Can Count On】 Worried about drops? We’ve got you covered. The patented built‑in silicone sleeve acts like a shock‑absorbing armor, cushioning your drive against bumps and falls. Whether it’s important work documents, precious family photos, or hard‑earned game saves, your data deserves this level of protection.
- 【Plug & Play, Compatible with Computers & Consoles】 No complicated setup—just plug in and go. Works seamlessly with Windows, Mac, and Linux computers, as well as PS4, PS5, Xbox One, and Xbox Series X/S. Process files at the office, back up data at home, or enjoy gaming in your downtime—one drive handles all your devices, simply and hassle‑free.
- 【USB 3.0 Ultra‑Fast Transfer – No More Waiting】 Tired of watching progress bars crawl? With USB 3.0 speeds up to 5Gbps, large files transfer in seconds. Whether you’re moving work documents, transferring hundreds of gigs of games, or backing up a year’s worth of photos, you get more done in less time.
- 【Sleek, Lightweight, and Ready to Go】 Weighing just 0.16 kg—lighter than a can of soda—this compact drive features a stylish mirror‑and‑frosted finish. Toss it in your bag and go, whether you’re heading to the office, visiting a friend for a gaming session, or giving a presentation on the road.
Setup passes but dependent tests fail in parallel
The account is probably mutating shared data. Switch to worker-specific accounts and state files, or serialize the conflicting tests while redesigning their fixtures.
State works in Chromium but not Firefox or WebKit
Authentication may be browser-specific, or the state may contain a token bound to a device. Generate a state file per project instead of sharing one file.
IndexedDB or passkey login is missing
Confirm your Playwright version and enable the corresponding BrowserContext storage-state options. The feature availability is version-dependent.
Session-based login is ignored
Implement the custom session-storage capture and addInitScript seeding described in the authentication guide; standard storage state does not cover it.
Expired or revoked credentials
Delete the stale file and rerun setup. In CI, ensure the account is enabled, secrets are current and setup runs before dependent projects.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If what you need is a clean image or PDF of a page rather than an authenticated Playwright test, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP tools let Claude, Cursor or another MCP client call take_screenshot, get_page_info and capture_pdf.
One request is enough:
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 documentation for authentication, selectors, waiting rules, device presets, PDF options, headers, cookies and other parameters.
Best Value
- Ultra fast data transfers: the external hard drive works with USB 3.0 thickened copper cable to provide super fast transfer speeds. Theoretical read speed is as high as 110MB/s-133MB/s and write speed is as high as 103MB/s.
- Ultra-thin and quiet: the motherboard adopts a noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
- Compatibility: compatible with PS4/xbox one/Windows/Linux/Mac/Android,Stable and fast downloading on game console no difference from fast transmission when using on PC.
- Plug and Play: no software to install, just plug it in and the drive is ready to use. The hard drive chip is wrapped with aluminum anti-interference layer to increase heat dissipation and protect data
- Package Contents: 1* portable hard drive, 1 *USB 3.0 cable, 1*USB to type C adapter,1 *user manual, shell packaging, three-year manufacturer's warranty and free technical support services
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)
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. Sign up for the free ScreenshotNeo plan.
FAQ
Should the POM call the login method?
Usually no. Keep login in setup or fixtures so every POM receives a page with an intentional, documented authentication state.
Can several tests write the same state file?
They should not. Generate a file once per account or worker and treat it as read-only during test execution.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Is API authentication always faster?
No. It is often simpler when a suitable endpoint exists, but browser challenges and application-specific security can make UI authentication the correct choice.
The Bottom Line
Save authentication once, load it through project configuration, and build POMs on the resulting authenticated pages. Share state only for non-conflicting tests; use separate accounts and worker-scoped files whenever tests mutate shared data.
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.

