{"record":{"id":"175dd14cfe786d2d","repo":"microsoft/playwright","slug":"connecting-to-selenium-remote-url-is-only-supporte","errorCode":null,"errorMessage":"Connecting to SELENIUM_REMOTE_URL is only supported by Chromium","messagePattern":"Connecting to SELENIUM_REMOTE_URL is only supported by Chromium","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/browserType.ts","lineNumber":296,"sourceCode":"        transport = new PipeTransport(stdio[3], stdio[4]);\n      }\n      return { browserProcess, artifactsDir: prepared.artifactsDir, userDataDir: prepared.userDataDir, transport, wsEndpoint };\n    } catch (error) {\n      await progress.race(closeOrKill(DEFAULT_PLAYWRIGHT_TIMEOUT).catch(() => {}));\n      throw error;\n    }\n  }\n\n  async connectOverCDP(progress: Progress, params: channels.BrowserTypeConnectOverCDPParams): Promise<Browser> {\n    throw new Error('CDP connections are only supported by Chromium');\n  }\n\n  async connectToWorker(progress: Progress, endpoint: string): Promise<Worker> {\n    throw new Error('CDP connections are only supported by Chromium');\n  }\n\n  async launchWithSeleniumHub(progress: Progress, hubUrl: string, options: types.LaunchOptions): Promise<Browser> {\n    throw new Error('Connecting to SELENIUM_REMOTE_URL is only supported by Chromium');\n  }\n\n  private _validateLaunchOptions(options: types.LaunchOptions): types.LaunchOptions {\n    let { headless = true, downloadsPath, proxy } = options;\n    if (debugMode() === 'inspector')\n      headless = false;\n    if (downloadsPath && !path.isAbsolute(downloadsPath))\n      downloadsPath = path.join(process.cwd(), downloadsPath);\n    if (options.socksProxyPort)\n      proxy = { server: `socks5://127.0.0.1:${options.socksProxyPort}` };\n    return { ...options, headless, downloadsPath, proxy };\n  }\n\n  protected _createUserDataDirArgMisuseError(userDataDirArg: string): Error {\n    switch (this.attribution.playwright.options.sdkLanguage) {\n      case 'java':\n        return new Error(`Pass userDataDir parameter to 'BrowserType.launchPersistentContext(userDataDir, options)' instead of specifying '${userDataDirArg}' argument`);\n      case 'python':","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/browserType.ts#L278-L314","documentation":"launchWithSeleniumHub is overridden only by Chromium; the base BrowserType implementation throws this error. Pointing Firefox or WebKit at a Selenium Hub (SELENIUM_REMOTE_URL) is not supported.","triggerScenarios":"Setting SELENIUM_REMOTE_URL and calling firefox.launch() / webkit.launch() (the launch path routes to launchWithSeleniumHub, which is the throwing stub for those types).","commonSituations":"CI grid that only speaks WebDriver/Selenium but the test config selected firefox/webkit while expecting Selenium bridging. Copying a Chromium Selenium setup to another browser family.","solutions":["Use chromium when SELENIUM_REMOTE_URL is set, since Selenium bridging is Chromium-only in Playwright.","Unset SELENIUM_REMOTE_URL and launch the browser locally, or connect via a Playwright WebSocket server endpoint for non-Chromium.","For Firefox/WebKit on a remote grid, use a grid that speaks the Playwright protocol, not Selenium."],"exampleFix":"// before: SELENIUM_REMOTE_URL set, then\nawait firefox.launch();\n// after\nawait chromium.launch(); // or unset SELENIUM_REMOTE_URL","handlingStrategy":"validation","validationCode":"function assertSeleniumCompatible(browserType: { name: string }) {\n  if (process.env.SELENIUM_REMOTE_URL && browserType.name !== 'chromium')\n    throw new Error('SELENIUM_REMOTE_URL is set but only chromium is supported');\n}","typeGuard":"function seleniumSupportedBrowser(bt: any): boolean {\n  return !process.env.SELENIUM_REMOTE_URL || bt?.name === 'chromium';\n}","tryCatchPattern":null,"preventionTips":["Do not set SELENIUM_REMOTE_URL for Firefox/WebKit runs.","Guard the env var in CI configuration per browser family."],"tags":["selenium","launch","chromium-only","browser-type"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}