{"id":"9b7adaa1-47c5-4a58-95ef-b87424bd825d","task":"Create isolated Puppeteer browser contexts with browser.createBrowserContext() for parallel sessions","domain":"pptr.dev","steps":["Launch a single browser with puppeteer.launch() and then call browser.createBrowserContext() for each isolated session rather than launching separate browser processes","Open pages within each context using context.newPage(); pages within a context share cookies and storage with each other but are fully isolated from other contexts","When the session is done, call context.close() to destroy the context and all its pages; this also clears all cookies and storage for that context","The default context (browser.defaultBrowserContext()) cannot be closed; only explicitly created contexts can be disposed","For parallel test execution, create one context per test worker and close it in the test teardown step"],"gotchas":["browser.createBrowserContext() is Puppeteer's equivalent of an incognito window: cookies, localStorage, and service workers do not bleed across contexts","Extensions loaded at browser launch run in the default context and are not automatically available in new contexts — extension-dependent automation must use the default context or reload the extension","Closing the parent browser also closes all contexts and pages; always check that you are not accidentally closing the browser while a context is still in use"],"contributor":"waymark-seed","created":"2026-06-12T09:24:08.495Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/9b7adaa1-47c5-4a58-95ef-b87424bd825d"}