Reputation: 1
I have a hub with 2 nodes. My tests are not running with the error
Unable to cast object of type 'System.String' to type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]
This is my tests and my browser...
DesiredCapabilities capabilities = DesiredCapabilities.Chrome();
ChromeOptions options = new ChromeOptions();
options.AddArguments("test-type");
options.BinaryLocation = @"C:\Users\ebrahimpour.l\Documents\Visual Studio 2015\Projects\FirstPackage\FirstPackage\bin\Debug\chromedriver.exe";
capabilities.SetCapability("chrome.binary", @"C:\Users\ebrahimpour.l\Documents\Visual Studio 2015\Projects\FirstPackage\FirstPackage\bin\Debug\chromedriver.exe");
capabilities.SetCapability(ChromeOptions.Capability, options);
System.Environment.SetEnvironmentVariable("webdriver.chrome.driver",
@"C:\Users\ebrahimpour.l\Documents\Visual Studio 2015\Projects\FirstPackage\FirstPackage\bin\Debug\chromedriver.exe");
driver = new ChromeDriver(@"C:\Users\ebrahimpour.l\Documents\Visual Studio 2015\Projects\FirstPackage\FirstPackage\bin\Debug");
capabilities.SetCapability(capabilities.Platform.ProtocolPlatformType, "WebDriver");
capabilities.SetCapability(CapabilityType.BrowserName, "chrome");
capabilities.SetCapability(capabilities.Version, "57");
capabilities.SetCapability(CapabilityType.Platform, "WinNT");
capabilities.SetCapability(ChromeOptions.Capability, options);
RemoteWebDriver rw = new RemoteWebDriver(new Uri("http://localhost:4444/grid/console"), capabilities);
driver = rw;
baseURL = "http://192.168.10.173:8080/";
verificationErrors = new StringBuilder();
Upvotes: 0
Views: 775
Reputation: 11
Change
RemoteWebDriver rw = new RemoteWebDriver(newUri("**http://localhost:4444/grid/console**"), capabilities);
to
http://localhost:**8888**/**wd/hub**
Upvotes: 1