Anchor Browser supports different configurations of the browser session (see API reference for all options).
Some of the most common configurations are:
Reconnect to an existing session using the session CDP Url.Validate the session created in the previous step is still active by checking the IP address.
Copy
Ask AI
const { chromium } = require("playwright-core");(async () => { const browser = await chromium.connectOverCDP(cdp_url); const page = await browser.newPage(); // Check the IP address await page.goto("https://www.whatismyip.com/"); await page.waitForTimeout(10000) console.log(await page.textContent('#region-state')) // Close browser but session remains active await browser.close();})().catch(console.error);