What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use page.goto() for the browser’s navigation milestone, then wait for the exact UI state your test needs. A direct await page.goto(url) waits for the load event by default. For faster, narrower synchronization choose domcontentloaded or commit. For modern applications, a locator-based assertion is usually the reliable definition of “finished”: wait for the heading, result, dialog, or other state that the next step actually uses.
What “finished loading” means in Playwright
Playwright exposes several navigation milestones. They describe browser lifecycle events, not a universal promise that every application task is complete.
| Milestone | What it signals | Use it when | Readiness risk |
|---|---|---|---|
commit |
The main response was received and document loading started. | Your code only needs navigation to begin. | The DOM and dependent resources may not be available yet. |
domcontentloaded |
The document’s DOMContentLoaded event fired. |
You need the DOM but not stylesheets, images, frames, or other later resources. | Client-side data and visible widgets can still be pending. |
load |
The document’s load event fired after dependent resources such as stylesheets, scripts, images, and iframes reached that milestone. |
You need the normal browser load milestone. | Single-page apps can fetch data and render UI after load. |
networkidle |
No network connections for at least 500 ms. | Only when your scenario specifically requires this condition. | Background polling, analytics, WebSockets, or advertisements can prevent it; Playwright discourages it as a generic test readiness check. |
There is no universal instant at which every page is “done.” A server-rendered page may be usable at domcontentloaded; a dashboard may not show its data until several API calls finish. Define readiness from the user-visible state your test depends on.
Basic navigation: the default load wait
import { test, expect } from '@playwright/test';
test('opens the home page', async ({ page }) => {
await page.goto('https://example.com');
// goto() waits for load by default.
await expect(page.getByRole('heading', { name: 'Welcome' })).toBeVisible();
});
The second line is important when the test needs a visible heading. The browser may have fired load while JavaScript is still rendering that heading. A web-first assertion retries until the condition is true or the test timeout expires.
#1 Best Overall
- FULL HD IPS DISPLAY - Enjoy vibrant, crystal-clear images with 178-degree wide-viewing angles
- AMD RYZEN 3 30 PROCESSOR - Everyday performance you can count on; Multitask, stream, game casually, and edit photos smoothly with responsive power and vibrant HDR visuals
- ENJOY UP TO 14 HOURS AND 15 MINUTES OF BATTERY LIFE - HP Fast Charge restores battery from 0 to 50% in approximately 45 minutes
- AMD RADEON 610M GRAPHICS - Experience smooth entertainment; Built for streaming and multitasking, enjoy realistic visuals and efficient performance for work and play
- STORAGE AND MEMORY - 512 GB PCIe NVMe M.2 SSD offers fast speed and efficient storage; and 8 GB LPDDR5 RAM memory boosts performance with higher bandwidth
Choose an earlier lifecycle event deliberately
Use domcontentloaded for DOM-only work
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
const title = await page.locator('h1').textContent();
This is appropriate when later images or other dependent resources are irrelevant to the next operation. It is not a substitute for waiting for asynchronously inserted application data.
Use commit when only navigation start matters
await page.goto('https://example.com', { waitUntil: 'commit' });
// The response has started loading; do not assume the page is interactive yet.
commit is useful for a workflow that immediately observes the new URL or coordinates another operation, but most UI tests need a later, condition-specific wait.
Keep the default load when resources matter
await page.goto('https://example.com', { waitUntil: 'load' });
Writing load explicitly can make a reviewer’s intent clear, although omitting the option has the same behavior for page.goto().
Rank #2
- Intel Celeron N4120: 4 Cores & Threads, 1.1GHz Base Clock, Up to 2.6GHz Boost Clock, 4MB Cache, Intel UHD Graphics 600. The perfect combination of performance, power consumption, and value helps your device handle multitasking smoothly and reliably with four processing cores to divide up the work.
- 14" HD Display: 14.0-inch diagonal, HD (1366 x 768), micro-edge, anti-glare. See your digital world in a whole new way. Enjoy movies and photos with the great image quality and high-definition detail of 1 million pixels.
- Memory & Storage: 4 GB LPDDR4x & 64 GB eMMC Storage. Adequate high-bandwidth RAM to smoothly run multiple applications and browser tabs all at once. An embedded multimedia card provides reliable flash-based storage.
- Ports:2 x USB 3.0 Type-A,1 x USB 3.0 Type-C,1 x HDMI,1 x Headphone Jack
- Chrome OS: Chromebook is a computer for the way the modern world works, with thousands of apps. Enjoy the seamless simplicity that comes with Google Chrome and Android apps, all integrated into one laptop. It’s fast, simple, and secure.
Wait for the application state your test needs
Assert a heading, result, or message
await page.goto('https://shop.example/search?q=keyboard');
await expect(
page.getByRole('heading', { name: 'Search results' })
).toBeVisible();
await expect(page.getByText('Keyboard')).toBeVisible();
Assertions describe an observable outcome rather than guessing how many milliseconds a framework needs. They also produce a useful failure when the expected state never appears.
Rely on locator actionability for clicks
await page.goto('https://example.com');
await page.getByRole('button', { name: 'Continue' }).click();
Before clicking, Playwright waits for the locator to resolve to one element and for that element to be visible, stable, able to receive events, and enabled. Adding a generic load-state wait before every click is usually redundant.
Wait for a URL after an action
await page.getByRole('link', { name: 'Next page' }).click();
await expect(page).toHaveURL(/next/);
await expect(
page.getByRole('heading', { name: 'Next page' })
).toBeVisible();
Use the URL and destination content that matter to the scenario. Playwright’s older page.waitForNavigation() API is deprecated and inherently racy; prefer page.waitForURL() or assertions.
Rank #3
- Stunning 15.6" FHD IPS Display: Experience crisp 1920x1080 resolution on this 15.6 inch laptop with an IPS panel that delivers wide viewing angles and vivid colors. The narrow-bezel design maximizes screen real estate for comfortable viewing on this Win 11 laptop, whether you're studying or working.
- Celeron J4105 Processor & 256GB SSD: Powered by a reliable Celeron J4105 processor paired with 12GB DDR4 memory and a fast 256GB M.2 SSD. This laptop computer supports SSD expansion up to 2TB and TF card expansion up to 1TB, so your storage grows with your needs. Delivers smooth multitasking for daily productivity.
- AI-Powered Win 11 Laptop: Built-in AI features enhance your productivity with smart assistance for writing, summarizing, and task management. Pre-installed with Win 11 and includes Office 365 subscription. This student laptop is backed by 1-year warranty and 24/7 customer support.
- All-Day 7000mAh Battery & 180° Hinge: The high-capacity 7000mAh battery keeps this laptop powered through long classes or meetings. The 180-degree lay-flat hinge lets you share your screen effortlessly during presentations. This durable laptop computer adapts to your dynamic workflow.
- Versatile Connectivity Hub: Equipped with USB 3.2, Type-C, Mini HDMI, and 3.5mm audio jack to connect all your peripherals. Stay online anywhere with high-speed 5G WiFi and Bluetooth 4.2. This college laptop keeps you connected at home, in the library, or on the go.
Wait for a load state after committed navigation only when needed
await page.goto('https://example.com', { waitUntil: 'commit' });
await page.waitForLoadState('domcontentloaded');
page.waitForLoadState(state) waits for a state on a navigation that has already committed. If the document has already reached that state, it resolves immediately. In ordinary tests, a locator assertion is generally a better synchronization point.
Why common waiting approaches fail
“The load event means the app is finished”
load covers browser resources, not every asynchronous fetch or framework render. Replace a bare load assumption with an assertion for the data or control the next step uses.
Free tools Windows power users keep installed
One-click scans. No signup required.
Using networkidle everywhere
Network idle means 500 ms without network connections, but an application with polling or third-party scripts may never become idle. Even when it does, a quiet network does not prove that the correct UI is visible. Use it only when the test’s contract genuinely requires that network condition.
Rank #4
- Efficient Performance for Everyday Computing: Powered by Intel N150 processor with up to 3.6 GHz Intel Turbo Boost Technology, 6 MB L3 cache, 4 cores, and 4 threads, this HP laptop delivers responsive performance for web browsing, streaming, document editing, and multitasking. Paired with 4GB LPDDR5 RAM and 128GB UFS storage, it handles daily tasks smoothly. Includes 1-year Microsoft 365 Personal subscription for Word, Excel, PowerPoint, and cloud storage to maximize your productivity.
- 14-Inch HD Micro-Edge Display:Enjoy clear visuals on the 14-inch HD (1366 x 768) anti-glare screen with 250-nit brightness and 62.5% sRGB coverage. The micro-edge bezel delivers a 79% screen-to-body ratio in a compact design. An HP True Vision 720p HD camera with noise reduction and dual-array microphones supports clear video calls, remote work, and online learning.
- Modern Connectivity and Wireless Technology: Stay connected with Wi-Fi 6 (2x2) for faster wireless speeds and Bluetooth 5.4 for seamless pairing with accessories. Versatile port selection includes 1 USB Type-C 10Gbps with DisplayPort 1.2 for external displays, 2 USB Type-A 5Gbps ports for peripherals, 1 HDMI 1.4b port, 1 headphone/microphone combo jack, and 1 multi-format SD media card reader. Connect monitors, transfer files quickly, and expand your workspace with ease.
- All-Day Battery Life and Portable Design: Enjoy up to 11 hours of video playback, 7.5 hours of mixed usage, or 7.5 hours of wireless streaming on a single charge, perfect for students and professionals on the go. Weighing just 3.24 lb and measuring 12.76" x 8.86" x 0.71", this lightweight laptop fits easily in backpacks and bags. The stylish willow green top cover with matte finish and natural silver keyboard deck with vertical brushing pattern offer a modern, professional look.
- AI-Enhanced Productivity: Access Microsoft Copilot instantly with the dedicated Copilot key for faster assistance. AI Noise Reduction filters background sounds and improves voice clarity during calls. Dual speakers provide clear audio, while the full-size natural silver keyboard and HP Imagepad support comfortable typing and navigation.
Adding fixed sleeps
await page.waitForTimeout(5000); // brittle: elapsed time is not readiness
A five-second delay is too long on a fast run and too short on a slow one. Replace it with a web-first assertion, a locator action, or a narrowly defined event.
Calling waitForLoadState() too early
The navigation must already be committed. Start navigation first, or let goto() perform the wait, then call waitForLoadState() only if that lifecycle state is part of the requirement.
Enumerating dynamic lists immediately
const rows = await page.getByRole('row').all();
locator.all() returns elements present at that instant; it does not wait for future matches. First wait for a stable indicator such as a result heading, a count, or the first expected row, then enumerate.
Best Value
- Efficient Intel Processor: Powered by Intel Celeron 5205U dual-core two-thread processor with a fixed 1.9GHz base frequency, 2MB Intel Smart Cache and advanced 14nm Comet Lake lithography. Integrated Intel UHD Graphics for 10th Gen Intel Processors delivers stable daily performance. It handles daily office tasks, web browsing, video streaming and light multitasking smoothly while featuring ultra-low power consumption for extended use.
- Fast Response Large Storage:Equipped with 12GB high-speed RAM to accelerate program loading and enable seamless multitasking. Built-in 256GB solid-state drive provides rapid boot and application launch speeds, offering ample storage space for your documents, software, photos and videos. Run daily productivity and multimedia applications without lag or slowdowns.
- 15.6" FHD IPS Eye-Care Display:This laptop features a 15.6-inch Full HD IPS panel with native 1920×1080 resolution and classic 16:9 widescreen ratio. Designed with slim 5mm ultra-narrow bezels, anti-glare coating and blue light filtering eye protection, it effectively reduces eye strain during long hours of studying, streaming or working, delivering vivid, immersive visual experiences. effectively reduce blue light and eye strain, bringing you immersive visual experience for watching videos and studying.
- Pre‑Installed Windows 11: Ready to Use Comes with a genuine Windows 11 system pre‑loaded, offering a clean, intuitive interface and broad software compatibility. Open the box, power on, and you're all set for school assignments, business reports, or daily computing needs.
- Rich Ports & Long Lasting Battery Life:Built-in 38Wh rechargeable battery and dual stereo speakers. Support Bluetooth 4.2 & 2.4G/5G dual-band WiFi for fast wireless connection. Equipped with Type-C, HDMI, 3.5mm audio jack, dual USB 3.0, Micro TF slot and DC charging port, meet your daily external device connection and office expansion needs.
Reliable patterns for real applications
Search results loaded by an API
await page.goto('https://example.com/search?q=playwright');
await expect(page.getByRole('status')).toHaveText(/results ready/i);
const results = page.getByRole('listitem');
await expect(results.first()).toBeVisible();
const count = await results.count();
Navigation followed by a confirmation
await page.getByRole('button', { name: 'Save' }).click();
await expect(page).toHaveURL(/settings/);
await expect(page.getByRole('alert')).toHaveText(/saved/i);
Waiting for a selector with a page-specific contract
await page.goto('https://example.com/app');
await expect(page.locator('[data-testid="app-ready"]')).toBeVisible();
A dedicated readiness marker can be clearer than a generic lifecycle event, provided the application owns and reliably sets it.
Timeouts, failures, and troubleshooting
- Timeout waiting for
load: inspect failed requests, slow third-party resources, redirects, and the URL itself. If the test does not need every dependent resource, choosedomcontentloadedand then assert the required UI. - Heading or result assertion times out: verify the locator name, authentication state, feature flags, and API responses. Capture a trace or screenshot at failure to see what actually rendered.
networkidlenever arrives: look for polling, streaming requests, service workers, analytics, or WebSockets. Remove the generic idle wait and assert the application state instead.- Click says the element is not actionable: the locator may match multiple elements, be covered by an overlay, be disabled, or still be moving. Use a more specific role/name locator and wait for the overlay to disappear; do not force the click unless bypassing actionability is explicitly what you are testing.
waitForLoadStateresolves but data is absent: that is expected when data is fetched after the lifecycle event. Wait for the data-bearing locator or status message.- Dynamic list is empty: wait for the list’s loaded indicator before calling
all(), and confirm that the API response succeeded. - Navigation assertion races: assert the resulting URL after the action with
expect(page).toHaveURL(); avoid deprecatedwaitForNavigation().
Performance and reliability decisions
- Start with the earliest milestone that satisfies the next operation:
commitfor navigation start,domcontentloadedfor an available DOM, orloadwhen dependent resources matter. - Use one meaningful assertion for each state transition instead of stacking sleeps and generic load waits.
- Keep waits close to the action that needs them. This makes failures point to the missing state rather than to an unrelated delay.
- Prefer stable roles, accessible names, and test IDs over styling selectors that can change during redesigns.
- Set a realistic test timeout for the environment, but do not use a larger timeout to hide an incorrect readiness condition.
Or skip the browser setup
If you only need an image or PDF of a URL rather than an interactive Playwright test, ScreenshotNeo provides a single request. It accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response reports the result with X-Page-Verdict and X-Billed headers. Its MCP server includes take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
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)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
See the ScreenshotNeo documentation for the 63 capture options, including full-page lazy-image loading, CSS-selector element capture, device and retina settings, PDF controls, custom CSS and JavaScript, click-before-capture, selector or network waits, request blocking, headers, cookies, user agents, timezone and geolocation, transparent backgrounds, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage data, and the OpenAPI specification. The parameter names used by other screenshot APIs also work, which can simplify migration.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Create a free ScreenshotNeo account.
Quick decision guide
- Need a normal page navigation? Use
await page.goto(url); its default wait isload. - Need only the parsed DOM? Use
waitUntil: 'domcontentloaded'. - Need navigation to have started? Use
waitUntil: 'commit'. - Need a rendered result, button, or message? Use a locator action or web-first assertion.
- Need a URL after a click? Use
expect(page).toHaveURL(). - Need a screenshot or PDF without maintaining a browser harness? Use ScreenshotNeo’s API or MCP server.
Frequently Asked Questions
Does page.goto() wait for JavaScript-rendered data?
It waits for the selected navigation milestone, with load as the default. JavaScript-rendered data may arrive later, so assert the specific locator or message containing the data.
When should I use networkidle?
Use it only when the scenario explicitly depends on 500 ms with no network connections. It is not a general replacement for waiting on the UI state your test needs.
What replaced page.waitForNavigation()?
Use page.waitForURL() for destination checks, plus locator assertions for destination content.
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.

