Glossary

Web Scraping & API Glossary

Comprehensive glossary of web scraping, crawling, and API terms. Learn the essential concepts and terminology used in web data extraction.

P

Playwright

(30)

How to fix "Execution context was destroyed, most likely because of a navigation"?

Playwright

This happens when evaluation starts on one document and the page navigates before it finishes. Coordinate the click and ...

How to fix "Frame was detached" errors in Playwright?

Playwright

Frame was detached means the iframe was removed or reloaded while you were using it. Re-acquire the frame right before a...

How to fix net::ERR_ABORTED during page.goto in Playwright?

Playwright

net::ERR_ABORTED often appears when navigation is interrupted by another navigation, redirect, or page close. Avoid over...

How to fix net::ERR_CONNECTION_REFUSED in Playwright navigation?

Playwright

net::ERRCONNECTIONREFUSED means nothing is listening on the target host/port. Start the web server before tests and veri...

How to fix net::ERR_INTERNET_DISCONNECTED or net::ERR_FAILED in Playwright?

Playwright

These errors indicate network failure (offline state, blocked DNS, proxy/VPN issues, or request blocking). Stabilize tes...

How to fix net::ERR_INVALID_AUTH_CREDENTIALS in Playwright?

Playwright

This means HTTP auth credentials are missing or incorrect. Set valid httpCredentials when creating the browser context. ...

How to fix Playwright APIRequestContext cookie mismatch between API and UI tests?

Playwright

API requests and browser pages may run in separate contexts, so auth cookies do not automatically sync. Share auth via s...

How to fix Playwright auth state issues when login passes but tests start logged out?

Playwright

This usually means storageState was saved in one context but not loaded in the project that runs your tests. Create auth...

How to fix common Playwright test mistake: `Cannot read properties of undefined`?

Playwright

This is a test code bug, usually from missing fixture args or wrong variable scope. Always destructure fixtures in the t...

How to fix Playwright "locator.click: Timeout ... element is not visible"?

Playwright

The locator exists but is hidden, covered, or outside expected UI state. Wait for visibility and stable state before cli...

How to fix Playwright Test error: "did not expect test() to be called here"?

Playwright

This occurs when test() is invoked outside a test file context, often in config/helpers imported by config. Keep test() ...

How to fix Playwright download tests that hang waiting for files?

Playwright

Downloads hang when listeners are attached after the click or when the app opens downloads in a new flow. Register waitF...

How to fix Playwright "Element is not attached to the DOM"?

Playwright

The element was re-rendered between lookup and action, so the handle became stale. Prefer locators (auto-retry) instead ...

How to fix Playwright `net::ERR_NAME_NOT_RESOLVED` in `page.goto`?

Playwright

ERRNAMENOT_RESOLVED means DNS lookup failed for the URL host. Verify baseURL, environment variables, and network access ...

How to fix Playwright "Executable doesn't exist" after install?

Playwright

Playwright package is installed, but browser binaries are missing in the environment. Install browsers (and system deps ...

How to fix Playwright "Execution context was destroyed" errors?

Playwright

This happens when the page navigates or reloads while your script is still evaluating in the old document. Wait for navi...

How to fix Playwright file upload failures with `setInputFiles`?

Playwright

Upload failures usually come from wrong file paths or hidden/non-file inputs. Target a real <input type="file"> and pass...

How to fix Playwright geolocation/permissions not applying in tests?

Playwright

Location APIs fail when permission is not granted for the right origin or context. Set geolocation and permissions at co...

How to fix Playwright mobile emulation issues when desktop layout still appears?

Playwright

Mobile layout can fail when viewport/device settings are overridden later in config or test. Use one clear project devic...

How to fix Playwright "No frame for selector" and iframe locator issues?

Playwright

Elements inside iframes are not reachable from top-level page.locator(...). Use frameLocator() and wait for iframe conte...

How to fix flaky Playwright popup/new-tab tests (`page.waitForEvent('popup')`)?

Playwright

Popup tests fail when code listens for the new page too late. Create the popup wait promise first, then click the opener...

How to fix Playwright "Protocol error (...): invalid argument"?

Playwright

A protocol invalid-argument error means a browser command received unsupported or malformed input. Validate option shape...

How to fix flaky Playwright crashes and random browser exits in CI?

Playwright

Random exits are commonly resource-related: low memory, too many workers, or unstable shared CI agents. Reduce concurren...

How to fix Playwright route mocking that does not intercept requests?

Playwright

Interception fails when route patterns do not match actual request URLs or are registered too late. Register page.route(...

How to fix Playwright selectors that fail with Shadow DOM components?

Playwright

App code using Shadow DOM can hide internals from brittle CSS selectors. Prefer user-facing locators (getByRole, getByLa...

How to fix Playwright "strict mode violation" locator errors?

Playwright

strict mode violation means your locator matches multiple elements, but the action needs exactly one. Narrow the locator...

How to fix Playwright "Target page, context or browser has been closed" after crashes?

Playwright

This error appears when the browser process exits unexpectedly or test cleanup closes context/page early. Check for cras...

How to fix Playwright TimeoutError when an action exceeds timeout?

Playwright

TimeoutError usually means Playwright could not find an actionable element in time. Use a more specific locator, wait fo...

How to fix Playwright "strict mode violation" for locators?

Playwright

Strict mode means a locator used for an action must match exactly one element. Refine the locator with role/name/test id...

How to fix "Target page, context or browser has been closed" in Playwright?

Playwright

This error appears when code uses page after page.close(), context.close(), or browser.close(). Ensure cleanup runs afte...

P

Puppeteer

(26)

How can DevTools windows be treated as a page in Puppeteer?

Puppeteer

DevTools windows can be treated as regular pages by enabling the handleDevToolsAsPage option when launching or connectin...

How can I expose BackendNodeId in the a11y snapshot?

Puppeteer

BackendNodeId is exposed in the a11y snapshot. Each node in the snapshot includes a backendNodeId that lets you map acce...

How can I get detailed initiator data from CDP in Puppeteer?

Puppeteer

Use the capability to retrieve detailed initiator data from CDP when available, and filter out goog: data from events by...

How can I open a page in a tab or a window using Puppeteer?

Puppeteer

This feature allows opening a page in a tab or a window. newPage() can now be called with window options to choose where...

How can landmarks improve accessibility testing in Puppeteer?

Puppeteer

Overview Landmarks such as header, nav, main, aside, and footer provide semantic regions that assist screen readers and ...

How to configure CDP message ID generator in Puppeteer?

Puppeteer

The CDP message ID generator can be configured by passing a custom idGenerator to the Connection constructor. This enabl...

How to disable xdg-open popup in Puppeteer?

Puppeteer

To stop the xdg-open popup in Puppeteer, configure a Chrome policy URLAllowlist and use a Chrome binary that reads that ...

How to expose the Connection from CdpBrowserContext in Puppeteer

Puppeteer

Summary This change adds a public getter to CdpBrowserContext to expose the internal Connection object. It returns the p...

How to expose the url property for links in Puppeteer

Puppeteer

How to expose the url property for links If you need the full URL of a link in Puppeteer, use the url property that was ...

How to fix duplicate response headers in Puppeteer

Puppeteer

Summary Duplicate header values should normally be merged into a single header value separated by a comma and a space. T...

How to fix Fetch.enable wasn't found error for workers in Puppeteer

Puppeteer

Fetch.enable wasn't found is raised when trying to enable the Fetch domain for a worker. The fix is to ignore this error...

How to fix Puppeteer ExtensionTransport tasks and session management

Puppeteer

Puppeteer now dispatches each CDP message in its own JavaScript task by scheduling dispatch with setTimeout. This ensure...

How to open DevTools for a Page in Puppeteer?

Puppeteer

To open DevTools for a page in Puppeteer, use the new Page.openDevTools() method. It calls the DevTools interface for th...

How can I reload a Puppeteer page while ignoring the cache?

Puppeteer

Use the ignoreCache option with Page.reload to reload while ignoring the browser cache. ``js await page.reload({ ignoreC...

How to use Puppeteer to override user agent with emulation setUserAgentOverride instead of network interception?

Puppeteer

Solution Use the Emulation.setUserAgentOverride command via a CDP session to override the user agent instead of relying ...

What does it mean that HTTPRequest.postData is deprecated in Puppeteer?

Puppeteer

The deprecation note indicates that the HTTPRequest.postData API is deprecated in Puppeteer. This means you should avoid...

What fixes Puppeteer not waiting for all targets when connecting?

Puppeteer

Fixes Puppeteer not waiting for all targets when connecting by only awaiting child targets for tab targets. When connect...

What is the correct event to create a Response in Puppeteer WebDriver?

Puppeteer

To align with the protocol behavior, create the Response when the responseStarted event fires, rather than after the res...

What is the correct type for the pageerror event in Puppeteer?

Puppeteer

Summary The pageerror event may emit not only Error objects but also values of unknown type. Treat the payload as unknow...

What is the difference between browser.close and browser.disconnect

Puppeteer

browser.close() and browser.disconnect() both end your current control flow, but they affect the browser lifecycle diffe...

What is the reason for removing the test server from release-please in Puppeteer

Puppeteer

The test server was removed from the release-please workflow to simplify the release process and remove an unnecessary e...

What target should I set for TypeScript to build Puppeteer types with tsc?

Puppeteer

If you run into TS18028 private identifiers errors when compiling Puppeteer types with TypeScript, set the TypeScript ta...

What TypeScript target should I use to compile Puppeteer-core types?

Puppeteer

To fix the TS18028 error, set the TypeScript target to ES2015 or higher. The error occurs because private identifiers (#...

Why are headers not updated when using Puppeteer page.setRequestInterception(true) on Firefox?

Puppeteer

Firefox currently mutates the headers object returned by request.headers() in a way that does not reflect in the respons...

Why does HttpRequest.headers() not allow mutating data in Puppeteer?

Puppeteer

This was fixed to prevent accidental mutations of the underlying headers. HttpRequest.headers() no longer allows mutatin...

Why is page.goto never awaited for Firefox addons pages in Puppeteer?

Puppeteer

Summary Firefox addon pages navigated via moz-extension:// are treated as webextension contexts. Puppeteer currently doe...

S

Scraping

(10)

How do you avoid getting blocked when scraping?

Scraping

Answer Avoid blocks by scraping politely and limiting request rates. Respect robots.txt, identify your user agent, and s...

How do you clean and validate scraped data?

Scraping

Answer Clean scraped data by trimming whitespace, normalizing formats, and removing duplicates. Validate fields with sch...

How do you handle pagination when scraping?

Scraping

Answer Handle pagination by identifying the next page link, page parameter, or API cursor. Start from the first page and...

How do you scrape JavaScript-heavy sites?

Scraping

Answer Use a headless browser to render the page before extracting data. Wait for key selectors to appear or for network...

How is web scraping different from web crawling?

Scraping

Answer Web crawling is about discovering and fetching pages, while web scraping is about extracting data from those page...

Is web scraping legal?

Scraping

Answer Web scraping legality depends on the site terms, the data collected, and local laws. Public data may be allowed, ...

What are common web scraping tools?

Scraping

Answer Common tools include Beautiful Soup, Scrapy, Playwright, Puppeteer, and Selenium. Lightweight parsers are great f...

What are ethical web scraping practices?

Scraping

Answer Ethical scraping means minimizing harm and respecting site owners and users. Follow robots.txt, terms of service,...

What is the best data format for scraped data?

Scraping

Answer The best format depends on how you plan to use the data. CSV is simple and works well for tabular data and quick ...

What is web scraping?

Scraping

Answer Web scraping is the process of extracting specific data from web pages and converting it into structured formats....

W

Webcrawling

(10)

How is web crawling different from web scraping?

Webcrawling

Answer Web crawling focuses on discovering and retrieving pages, while web scraping extracts specific data from those pa...

How often should you crawl a site?

Webcrawling

Answer Match crawl frequency to how often content changes and how quickly you need updates. High‑change sites may need m...

How do you avoid getting blocked when crawling?

Webcrawling

Answer To avoid getting blocked, crawl politely and predictably. Respect robots.txt, use reasonable rate limits, and ide...

How do you crawl JavaScript-heavy sites?

Webcrawling

Answer To crawl JavaScript‑heavy sites, use a headless browser to render pages before extracting content. Wait for criti...

Is web crawling legal?

Webcrawling

Answer Web crawling legality depends on the website, the data you collect, and the laws in your jurisdiction. Many sites...

What are common web crawling tools?

Webcrawling

Answer Common web crawling tools include Scrapy, Apache Nutch, Playwright, Puppeteer, and managed crawler platforms. Scr...

What data does a web crawler collect?

Webcrawling

Answer Common crawler data includes URLs, status codes, headers, page content, metadata, links, and timestamps. Many sys...

What is crawl budget?

Webcrawling

Answer Crawl budget is the number of pages a crawler can fetch within time and resource constraints. It is limited by yo...

What is robots.txt?

Webcrawling

Answer robots.txt is a file at a site root that tells crawlers which paths they may or may not access. It uses a simple ...

What is web crawling?

Webcrawling

Answer Web crawling is the automated process of discovering and fetching web pages by following links so you can build a...