Cannot start the driver service on localhost when using geckodriver with Firefox 50.0.1 in .NET

645 views Asked by At

I'm learning Selenium from the scratch and trying to run a test case on Firefox 50.0.1 using geckodriver I installed in VS2015 by selecting Selenium.WebDriver.GeckoDriver.Win64

However, when running the test I got an exception

Cannot start the driver service on localhost

What am I missing? I was following some tutorials and performed step by step walk-through.

This is my code:

[TestMethod]
public void WebDriverSample()
{
    IWebDriver webDriver;
    //IWebDriver webDriver = new InternetExplorerDriver();
    //Thread.Sleep(1000);
    //webDriver.Dispose();

    //webDriver = new ChromeDriver();
    //Thread.Sleep(1000);   
    //webDriver.Dispose();


    webDriver = new FirefoxDriver();
    Thread.Sleep(1000);
    webDriver.Dispose();
}

When using Firefox 47.0.2, I did not need to use geckodriver at all and it worked just fine. Now, since browsers are getting updated, at some point I need to start using new versions. So, I need to find out what to do in order to be able to adapt to new changes and use geckodriver

Any suggestons?

0

There are 0 answers