The examples assume your own test profile and a harmless page such as example.com. Automation controls your profiles and actions; it does not make an account trusted, does not bypass site protections and does not guarantee that a sign-in will persist.
After a profile starts, Aurorium's Local API returns a DevTools WebSocket address (ws) and a debugging port (debug_port). Playwright attaches to the profile with chromium.connectOverCDP, and Puppeteer with puppeteer.connect. For Selenium, the ChromeDriver documentation describes attaching to the port through debuggerAddress, while Aurorium has no separate WebDriver URL.
Both working methods rely on CDP (Chrome DevTools Protocol), the protocol tools use to control browsers built on the Chromium engine. For a Playwright antidetect browser setup, this sets the main requirement: the script connects to a browser that Aurorium has already launched and works in the profile's environment. This is a separate step in browser profile automation, and it comes with its own errors.
General framework rankings are of little help here. For profile work, it matters more how a framework attaches to a browser it did not launch and who closes that browser afterwards.
Choose a framework for your workflow
If your team already has Playwright or Puppeteer scripts, there is no reason to switch frameworks for Aurorium: both take the same ws address from the API response. Selenium is harder. It works through a driver (ChromeDriver), and attaching it to an already open browser is done differently, with the driver version matched to the browser.
The table compares the frameworks in one role: how each connects to a running profile. Languages, methods and limitations come from the frameworks' official documentation.
| Playwright | Puppeteer | Selenium | |
|---|---|---|---|
| Languages (official) | JavaScript/TypeScript, Python, Java, .NET | JavaScript (Node.js) | Java, Python, C#, Ruby, JavaScript, Kotlin |
| How to connect to a running profile | chromium.connectOverCDP(ws) or http://127.0.0.1:<debug_port> | puppeteer.connect({ browserWSEndpoint: ws }) | debuggerAddress = 127.0.0.1:<debug_port> + ChromeDriver of the same major version |
| What is taken from the Aurorium response | ws (or debug_port) | ws | debug_port (the webdriver field = null) |
| Limitations of this connection | lower fidelity than Playwright's native protocol; Chromium only | not described for connect in the documentation | some commands are unavailable; needs a ChromeDriver that matches the core version |
| Disconnecting without closing | browser.close() on a connected browser: disconnects and clears the created contexts | browser.disconnect() | — |
Playwright and Puppeteer can work with Firefox, and Playwright with WebKit as well, but those are capabilities of the frameworks themselves. Aurorium launches profiles with CDP, and according to Playwright's documentation, its CDP connection works only with Chromium-based browsers. So do not carry a browser list from a framework's documentation over to Aurorium: test which profile cores support this kind of connection on your own profiles.
Where to start in typical situations:
Node.js code, and you need a short path to a working script. Playwright or Puppeteer, connecting over ws.
The team writes in Python, Java or .NET. Playwright: it has official versions for these languages. Check your language version's documentation for whether it offers a CDP connection and what the method is called.
Many existing Selenium tests. You can try attaching through debuggerAddress: start with a disposable profile and record the Selenium, ChromeDriver and core versions.
You need a ready WebDriver URL from the app. Aurorium does not document one, so you cannot plan around it.
If you need the framework mainly for testing a web application, the article on browser profiles in testing will help.
Read the connection details from Aurorium
A profile is started with a POST /browser/start request to the Local API at 127.0.0.1:50325, with the key passed in the Authorization: Bearer header. We described how to get a key, check that the API is ready and read the error codes in the article on how to start and stop a profile through the Local API. Here you only need the response fields the framework works with.
| Field | What it is | Who needs it and why |
|---|---|---|
| ws | DevTools WebSocket address of the form ws://127.0.0.1:<port>/devtools/browser/... | Playwright and Puppeteer connect over it |
| debug_port | the debugging port of the profile's browser | Selenium (127.0.0.1:<debug_port>), Playwright (the http variant http://127.0.0.1:<debug_port>) |
| already_running | whether the profile was already running on this device before the request | it determines whether the script stops the profile at the end |
| webdriver | null in the example response, purpose unclear | do not build logic on this field |
Aurorium does not document a separate WebDriver URL. The response does contain a webdriver field, but an empty value in the example and the lack of a description give no grounds to treat it as working.

The ws address is tied to a specific launch. After a profile restart, take a new one from the fresh start response and do not keep the old one in a config.
What else the API can do and which plans include it is covered on the API and automation page.
Playwright and Puppeteer connections
In Playwright, you connect to a profile with chromium.connectOverCDP(ws). The method accepts both a WebSocket address and an http address of the form http://127.0.0.1:<debug_port>. The profile's context already exists by the time you connect, and browser.contexts() returns it. Open new tabs in that context. A browser.newContext() call creates a separate context that will not be the profile's working environment.
This kind of connection has a cost. According to the connectOverCDP description in the Playwright documentation, a CDP connection has significantly lower fidelity than Playwright's native protocol, and if the browser was not launched by Playwright, some features may behave differently. Check every feature your scenario relies on against your own profile before you put the script to work.
The browserType.connect() method is often mistaken for the right one because of its name. It is meant for a server that Playwright itself started through launchServer, and it does not fit an Aurorium profile.
Puppeteer connects with puppeteer.connect({ browserWSEndpoint: ws }) (method description in the Puppeteer documentation). The parameters include defaultViewport: per the documentation, it defaults to 800×600 and can be null. To keep tabs at the profile window's size rather than Puppeteer's default viewport, pass defaultViewport: null. The browserURL option is also on the list, but the documentation gives it no description, so connecting through browserWSEndpoint is the safer choice.
The frameworks disconnect in different ways. In Puppeteer, browser.disconnect() detaches the script and leaves the browser running, while browser.close() closes the browser with all its pages. In Playwright, browser.close() on a connected browser, per the documentation, clears the contexts the script created and drops the connection.
The article on signs of an automated browser covers what a site can notice when a browser is controlled over a protocol.
What Selenium requires
The query "selenium antidetect browser" covers two different paths.
1. A ready WebDriver URL. Some antidetect browsers return such a URL separately in their API. Aurorium does not document one: the webdriver field in the example response is null.
2. Attaching to the debugging port. You pass the debuggerAddress option with the value 127.0.0.1:<debug_port> in ChromeOptions, and ChromeDriver connects to the already open browser instead of launching a new one (ChromeDriver capabilities).
The second path has two known conditions. ChromeDriver must match the browser's major version, and you can find the profile's core version on connection, for example through browser.version() in Playwright or Puppeteer. Also, not all commands are available through debuggerAddress. The Chrome documentation gives the example of resizing a window, which ends with the error "operation not supported when using remote debugging".
If you try this path, record the Selenium, ChromeDriver and core versions and work on a disposable profile. Separately, find out what driver.quit() does with this kind of connection.
Run one minimal integration test
The first check can be reduced to six steps:
- Start your test profile through POST /browser/start.
- Connect to it over ws.
- Open a new tab with example.com in the profile's context.
- Read the page title and close the tab.
- Disconnect the framework.
- Stop the profile through the API if this same script started it.

The example below is written in Playwright and Node.js. Do not replace the connection with a chromium.launch() call: that opens a separate Playwright browser without the profile, and such a launch is not an Aurorium integration even if the script runs without errors.
import { chromium } from 'playwright';
const headers = { Authorization: `Bearer ${process.env.AURORIUM_API_KEY}`, 'Content-Type': 'application/json' };
const body = JSON.stringify({ profile_id: process.env.AURORIUM_PROFILE_ID }); // your test profile
async function call(path) {
const json = await fetch(`http://127.0.0.1:50325/api/v1${path}`, { method: 'POST', headers, body }).then((r) => r.json());
if (json.code !== 0) throw new Error(`${path}: code ${json.code} ${json.msg} (request_id ${json.request_id})`);
return json.data;
}
const { ws, debug_port, already_running } = await call('/browser/start');
const browser = await chromium.connectOverCDP(ws);
try {
console.log({ debug_port, already_running, core: browser.version() });
const page = await browser.contexts()[0].newPage(); // the profile's context, not a new one
await page.goto('https://example.com');
console.log('Title:', await page.title());
await page.close();
} finally {
await browser.close(); // disconnects Playwright
if (!already_running) await call('/browser/stop');
}Save the file with the .mjs extension and run it in Node.js 18+, which has built-in fetch and top-level await in modules. The script takes the key and the profile ID from environment variables; the names AURORIUM_API_KEY and AURORIUM_PROFILE_ID were chosen for the example. Local API errors arrive with HTTP 200, so the script checks the code field. The script does not create or delete the profile, and it stops it only on already_running: false.
The expected output is debug_port, already_running, the core version and the title "Example Domain".
Diagnose connection and session errors
| Symptom | Likely cause | What to check |
|---|---|---|
| Connection refused (ECONNREFUSED) or the connection times out | the profile is not running or has already been stopped; the script uses a ws from a previous launch | call start again, take a fresh ws, check debug_port |
| A clean browser opened without the profile's bookmarks and cookies | launch() was called instead of connecting, or a new context was created | connect through connectOverCDP / connect and work in browser.contexts(); if the sign-in disappears between launches, see how to save and restore a session |
| Connected, but there are no tabs or the wrong one is selected | the wrong context or the wrong page was taken | log all contexts and pages, and select the one you need explicitly |
| Selenium: the session is not created, driver version error | ChromeDriver does not match the core's major version | find the core version through browser.version(), pick a matching ChromeDriver |
| Selenium: "operation not supported when using remote debugging" | the command is unavailable when connecting through debuggerAddress | do without this command |
| The API returned code 1204 | the profile is open on another device | close it there; the code is explained in the Local API article |
| The API returned code 1304 | the browser core is not installed or is still downloading | wait for the download in the app: the API does not download the core |
| After the script, the profile stayed open or closed unexpectedly | disconnecting and stopping were mixed up | disconnect with the framework, stop through POST /browser/stop if the script itself started the profile |
Framework error texts in the table, apart from the ChromeDriver message, are described as symptoms: the exact wording depends on the package version.
Disconnecting the framework drops the script's connection to the browser, while stopping the profile is a separate POST /browser/stop request. A repeated start for a profile that is already open on this device does not launch a second browser and returns already_running: true. Such a profile was started before the script, manually or by another process, so the script should not stop it.
It is better not to call POST /browser/stop-all in production scripts. It stops all profiles on the device, including those the script has nothing to do with.

Conclusion
If your code is already written in Playwright or Puppeteer, connect over ws and start with the minimal script on a disposable profile. For Selenium, budget time for matching ChromeDriver to the core and checking the commands you need. Once the connection is stable, you can move on to tasks such as data collection with browser profiles. Log the framework and core versions: when the core or the framework is updated, they help you find the cause of a failure faster.



