Unable to instantiate Firefox using Marionette driver over Selenium and C#. os error Unable to instantiate Firefox using Marionette driver over Selenium and C#. os error selenium selenium

Unable to instantiate Firefox using Marionette driver over Selenium and C#. os error


So I ran into the 'os error' issue when I was trying to get Marionette working. The source of the issue in my case was I was trying to use some NuGet package called 'Mozilla Firefox Webdriver 0.6.0.1' which I believe had a very old version of the (now called) geckodriver.exe.

I downloaded the latest version of the driver from here https://github.com/mozilla/geckodriver/releasesrenamed to wires.exe and put in my working directorythen I had to initiate the driver using the following code.

FirefoxDriverService service = FirefoxDriverService.CreateDefaultService();service.FirefoxBinaryPath = @"C:\Program Files (x86)\Mozilla Firefox\firefox.exe";Driver = new FirefoxDriver(service);

The way you initated the driver was giving me an entity not found exception.

Hope this helps


Maybe DesiredCapabilities would work.

   DesiredCapabilities capabilities = DesiredCapabilities.Firefox();   capabilities.SetCapability("marionette", true);   var driver = new FirefoxDriver(capabilities);