Straight out of the box I can't get selenium grid to work. I have selenium server 3.4.0 and the following code produces the error shown
Error received
An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll
Additional information: The path to the driver executable must be set by the
webdriver.gecko.driver system property; for more information, see
https://github.com/mozilla/geckodriver. The latest version can be downloaded
from https://github.com/mozilla/geckodriver/releases
Simple code
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var url = new Uri("http://10.6.122.49:5555/wd/hub");
var options = new FirefoxOptions();
options.SetPreference("webdriver.gecko.driver", @"D:\geckodriver.exe");
var driver = new RemoteWebDriver(url, options.ToCapabilities());
driver.Navigate().GoToUrl("http://www.google.com");
}
}
}
Update