Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches. 50+ tests passed.
Python ai-agentsanti-detectantidetect-browserbot-detectionbrowser-automationcaptcha-bypasschromiumcloudflarecloudflare-bypassfingerprintheadless-browserplaywrightpuppeteerpythonrecaptchaseleniumstealth-browserundetectedweb-scrapingwebscraping
/**
* Keep the suite away from the developer's real ~/.cloakbrowser.
*
* A license.key (or a cached version marker) there changes how a launch resolves
* its key and build — tests would then assert against whatever the developer
* happens to have installed.
* A fixed path (not mkdtemp) so parallel workers share one dir instead of each
* stranding its own.
*/
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
const cacheDir = path.join(os.tmpdir(), "cloakbrowser-test-cache");
fs.mkdirSync(cacheDir, { recursive: true });
process.env.CLOAKBROWSER_CACHE_DIR = cacheDir;