You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:使用Selenium 3.10.0无法打开Chrome浏览器的问题

Fixing "SessionNotCreatedException: unable to connect to renderer" with Selenium 3.10.0, Chrome 62 & ChromeDriver 2.34

Hey there, I’ve run into this exact error before, so let’s walk through the fixes that usually resolve it. The "unable to connect to renderer" issue typically stems from browser process conflicts, configuration missteps, or minor environment glitches—even though your Chrome/ChromeDriver version pairing (62 ↔ 2.34) is actually correct!

Common Fixes to Try (in order of simplicity)

1. Kill All Chrome/ChromeDriver Background Processes

Sometimes leftover Chrome or ChromeDriver processes hog resources and block new sessions from starting:

  • Open Task Manager (Ctrl+Shift+Esc)
  • Find and end all instances of chrome.exe and chromedriver.exe
  • Restart your test script and try again

2. Verify ChromeDriver Path Configuration

Double-check that your Java code is pointing to the correct ChromeDriver executable path, and that the path has no spaces (or is wrapped properly if it does):

// Make sure this path matches where you saved chromedriver.exe
System.setProperty("webdriver.chrome.driver", "C:\\path\\to\\chromedriver.exe");

If you’ve added ChromeDriver to your system PATH, you can skip setting this property—but confirm the PATH entry is correct.

3. Add Chrome Startup Arguments to Avoid Conflicts

Browser extensions, sandbox restrictions, or popup blockers often interfere with Selenium. Add these arguments to your ChromeOptions to bypass common issues:

ChromeOptions options = new ChromeOptions();
// Disable extensions that might block the renderer
options.addArguments("--disable-extensions");
// Turn off popup blocking
options.addArguments("--disable-popup-blocking");
// Bypass sandbox restrictions (critical for Windows 7 in some cases)
options.addArguments("--no-sandbox");
// Fix shared memory allocation issues
options.addArguments("--disable-dev-shm-usage");
// Force Chrome to start in a clean state
options.addArguments("--incognito");

WebDriver driver = new ChromeDriver(options);

4. Update Java to a More Recent 1.8.x Version

Java 1.8.0_91 is quite outdated, and older Java builds can have compatibility quirks with Selenium and ChromeDriver. Try updating to the latest available Java 1.8 update (like 1.8.0_391) — it’s backward compatible and often fixes low-level connection issues.

5. Validate Selenium Dependencies

Ensure your project has the correct, non-conflicting Selenium JARs:

  • Make sure you’re using Selenium 3.10.0 for all components (selenium-java, selenium-chrome-driver, etc.)
  • Remove any older or duplicate Selenium JARs from your build path that might cause conflicts

Final Notes

If none of the above work, try reinstalling Chrome 62 (make sure it’s the exact version) and ChromeDriver 2.34, then repeat the steps above. More often than not, killing background processes or adding those startup arguments will get your session running again.

内容的提问来源于stack exchange,提问作者manish kumar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:13:26