Christu
2 min readAug 13, 2023

Selenium 4.11.0 Issue: org.openqa.selenium.remote.NoSuchDriverException

Are you encountering the dreaded org.openqa.selenium.remote.NoSuchDriverException error while running your test scripts in Selenium 4.11.0? If so, there might be a simple solution to get your scripts up and running smoothly again. It turns out that this issue might be related to your VPN connection.

The Problem

When you attempt to execute your Selenium test scripts with Selenium 4.11.0, you might stumble upon the following error :

org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}, error Command failed with code: 65, executed: [C:\Users\USERNAME\AppData\Local\Temp\selenium-managerXXXXX\selenium-manager.exe, --browser, chrome, --output, json]
error sending request for url (https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.170/win64/chromedriver-win64.zip): error trying to connect: tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061)
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '19.0.2'

This error, along with other diagnostic messages, can be baffling and frustrating, leaving you scratching your head for a solution.

The Bug and the Future

This issue has already been reported as a bug by Selenium to Google. It’s possible that the bug could be addressed in a future release. In the meantime, if you’re stuck dealing with this error, you have a couple of options.

The Solution

Interestingly, the cause of this error might be linked to your VPN (Virtual Private Network) connection. If your VPN is active while you’re running the test scripts, it can lead to the error mentioned above. The root of the problem seems to be connectivity issues related to VPN.

Steps to Solve

If you’re facing this issue, consider trying the following steps to resolve it:

  1. Disconnect VPN: Before running your Selenium test scripts, disconnect from your VPN. This might immediately resolve the NoSuchDriverException error.
  2. Run Tests without VPN: While running your test scripts, ensure that your VPN connection is turned off. This simple action might help your scripts to run smoothly without encountering the connectivity issues caused by the VPN.
  3. Verify Connectivity: If your scripts are still not working after disconnecting from the VPN, double-check your internet connection. Make sure that you have a stable and active internet connection.
  4. Third-Party Managers: One option is to consider using third-party driver managers like WebDriverManager to download the driver. These managers can help you bypass the issue and keep your tests running smoothly.

Conclusion

The org.openqa.selenium.remote.NoSuchDriverException error in Selenium 4.11.0 might seem like a roadblock, but it could be tied to your VPN connection. By disconnecting from your VPN and ensuring a stable internet connection, you might find that your test scripts run flawlessly.

So, the next time you’re faced with this error, remember to try running your Selenium test scripts without a VPN. It might just be the key to solving this particular challenge and getting your tests back on track.

Happy testing!

Christu

#Automation Test Engineer #SeleniumJava for Web Automation #PlaywrightJS for Web & API Automation #WinAppDriver for Windows Automation #Mkdocs - Documentation