Kirean Watkins Kirean Watkins - 1 year ago 421
C# Question

Selenium chromedriver not working

I still cannot figure this out. I've had selenium working fine a couple days ago; now it's throwing me some errors. I use NuGet at first then I tried manually installing it.

how to reproduce the problem:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using System.Threading.Tasks;

namespace Debug
class Program
static void Main(string[] args)
IWebDriver driver = new ChromeDriver();
catch (Exception ex)


OpenQA.Selenium.WebDriverException: A exception with a null response
was thrown sending an HTTP request to the remote WebDriver server for
URL http://localhost:60695/session. The status of the exception was
ReceiveFailure, and the message was: The underlying connection was
closed: An unexpected error occurred on a receive. --->
System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a receive. ---> System.IO.IOException:
Unable to read data from the transport connection: An existing
connection was forcibly closed by the remote host. --->

How I installed selenium,
download from

went onto VS and added the only the dlls to references

Answer Source

Install nuget package in following order:

Install-Package Selenium.WebDriver

Install-Package Selenium.WebDriver.ChromeDriver

I hope it should work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download