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

求助:Selenium 3.11搭配IEDriverServer在Win10调用IE11连接异常

排查Selenium调用IE11时的java.net.ConnectException问题

Hey there, let's work through this IE11 connection issue step by step—this is super common with Selenium and IE, so we'll get you up and running in no time! Here are the most likely fixes to try:

  • 调整IEDriverServer的位数选择
    Even though you're on 64-bit Windows, IE11's 64-bit IEDriverServer has known stability issues on Windows 10. I'd strongly recommend switching to the 32-bit version of IEDriverServer (make sure it matches your Selenium 3.11 installation version). This fixes the connection failure for most users facing this exact problem.

  • 统一IE安全区域的保护模式设置
    IE's security settings often block the driver from establishing a connection. Open IE, go to 工具 > Internet选项 > 安全 tab, then check each zone (Internet、本地Intranet、受信任站点、受限制站点). Ensure the 启用保护模式 checkbox is set to the same state for all zones—either all checked or all unchecked.

  • 验证IEDriverServer的路径配置
    Double-check that your Java code correctly points to the IEDriverServer executable. For example:

    System.setProperty("webdriver.ie.driver", "C:\\path\\to\\IEDriverServer.exe");
    WebDriver driver = new InternetExplorerDriver();
    

    Make sure the path is accurate (use double backslashes or forward slashes) and the file exists. Alternatively, add the IEDriverServer's folder to your system PATH environment variable so Selenium can find it automatically.

  • 确认IE缩放级别为100%
    IE's zoom level must be set to exactly 100% for the driver to initialize properly. Go to 查看 > 缩放 in IE and verify it's set to 100%.

  • 匹配Selenium与IEDriverServer的版本
    Ensure your IEDriverServer version matches your Selenium 3.11 version. Mixing versions (e.g., using a 4.x IEDriverServer with Selenium 3.11) can cause connection errors. Stick to the 3.11 version of IEDriverServer.

  • 检查防火墙/杀毒软件的拦截
    Windows Defender or third-party antivirus might be blocking IEDriverServer from establishing a local connection. Try temporarily disabling your firewall/antivirus to test, or add the IEDriverServer executable to your security software's trusted list.

内容的提问来源于stack exchange,提问作者Divakar Ragupathy

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.20 10:07:54