java.net.ConnectException: Failed to connect to localhost error with Selenium 3.11.0 with IEDriverServer and IE 11 on Windows 10

社会主义新天地 提交于 2019-12-06 03:12:27

The error says it all :

3.9.0.0
Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:29313
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:08.638Z'
System info: host: 'DESKTOP-B1D1PSJ', ip: '192.168.79.96', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161'
Driver info: driver.version: InternetExplorerDriver

It is clear from your error stack trace that the new session is not getting initiated and the driver.version is also not getting recognized.

Your main issue is the version compatibility between the binaries you are using as follows :

  • You are using Selenium Client v3.11.0
  • You are using IEDriverServer v3.9.0.0
  • You are using InternetExplorer v11.0 (as per your question)

So there is a clear mismatch between the Selenium Client v3.11.0 , IEDriverServer v3.9.0.0.

Solution

  • Upgrade IEDriverServer to v3.11.1.
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
  • If your base Web Browser base version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Browser.
  • Execute your @Test.

Additional Considerations

  • You are using the flag INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true which is against the best practice. Don't do it.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!