What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use await browser.pages() to get a Page[] for all open pages across a Puppeteer browser’s contexts. To list pages in just one context, use await context.pages(). Both methods are asynchronous, and the ordinary listing omits non-visible pages such as extension background pages.
List pages across the browser
Call pages() on the Browser instance and await its promise before iterating. Each result is a Puppeteer Page, which represents a browser tab or an extension background page.
As an Amazon Associate I earn from qualifying purchases.
const pages = await browser.pages();
for (const page of pages) {
console.log(await page.title(), page.url());
}
browser.pages() includes pages from all browser contexts belonging to that browser. A launched browser has at least a default context, and applications can create additional contexts. Choose this method when you need browser-wide discovery rather than pages in a particular user context.
Limit the listing to one browser context
Call pages() on the BrowserContext when the task is scoped to that context:
#1 Best Overall
const contextPages = await context.pages();
The returned value is also a Promise<Page[]>, but it contains pages in that context only. A popup opened by a page belongs to its parent page’s context, so it is included in that context’s listing.
| Method | Call on | Scope | Result |
|---|---|---|---|
browser.pages() |
Browser |
All browser contexts | Promise<Page[]> |
context.pages() |
BrowserContext |
That context only | Promise<Page[]> |
Know what the result includes
The ordinary listing does not include non-visible pages; Puppeteer’s API documentation gives background_page as an example. The methods accept an optional includeAll boolean, documented as experimental. Setting it to true includes all kinds of pages according to the API reference:
Rank #2
const allPages = await browser.pages(true);
const allContextPages = await context.pages(true);
If you specifically need a non-visible target such as an extension background page, the Puppeteer API documentation points to Target.page() for finding it. Do not assume the returned array is ordered by visible tab position: the API references do not specify a stable ordering contract.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Handle results safely
- Await the call: both methods return promises. Iterating before awaiting gives you a promise, not a page array.
- Choose the scope deliberately: use the browser method for all contexts and the context method for just one context.
- Do not rely on tab order: if your logic depends on a particular page, identify it by a property such as URL or title instead of an assumed array position.
- Account for page changes: tabs can be opened or closed while your program runs. Take a fresh listing when you need current state.
Troubleshooting
The result is empty or missing a page
Confirm that you are calling the method on the intended browser or context and that the page has been created in that scope. If the missing page is non-visible, the ordinary listing may omit it; the optional experimental includeAll argument or the documented Target.page() route may be relevant.
The code says the result is not iterable
Await the method call before using a loop: const pages = await browser.pages();. Without await, pages is a promise.
The page order does not match the tabs you expected
The API references do not promise visible-tab ordering. Find a page by its URL, title, or another property your application controls; do not use an array index as a tab identity.
Rank #4
A method or option behaves differently in your installation
The reviewed Puppeteer API references displayed different 25.x versions: the Browser reference showed 25.9.0, while the BrowserContext reference showed 25.12.0. Check the documentation matching your installed package, especially before relying on the experimental includeAll option.
Or skip the browser setup
If your goal is a screenshot of a URL rather than enumerating tabs in an existing Puppeteer browser, ScreenshotNeo can return an image or PDF from one GET request. Its API does not list open Puppeteer pages.
Best Value
- Used Book in Good Condition
cURL, with the API details in the ScreenshotNeo documentation:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same request in 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)
Or 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}`);
- Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers indicate the page verdict and billing status.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents. - The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
Frequently Asked Questions
What type does Puppeteer return from pages()?
A promise that resolves to an array of Puppeteer Page objects: Promise<Page[]>.
Does browser.pages() include pages from other browser contexts?
Yes. It lists pages across the browser’s contexts; use context.pages() when you want only one context.
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.




