Selenium Grid 2 set up on Windows

Viewed 16352

I am setting up Selenium Grid 2 (selenium-server-standalone-2.1.0) on Windows 7 (I have also tried Windows Server 2008) both 64 bit. I test the WebDriver locally and all is well.

I launch the hub with:

java -jar selenium-server-standalone-2.1.0.jar -role hub

Adding a webDriver node for FireFox works, but anything else such as Google Chrome throws an IllegalOperation Exception.

For example:

I try adding a node for Chrome:

java -jar selenium-server-standalone-2.1.0.jar -role webDriver -hub http://127.0.0.1:4444 -browser browserName=chrome platform=windows version=12 -port 5556

This shows as a node on the hub when you go to http://localhost:4444/grid/console

I add code to call the webDriver such as:

            DesiredCapabilities capability = new DesiredCapabilities();
            capability.SetCapability(CapabilityType.Platform, "windows");
            capability.SetCapability(CapabilityType.Version, "12");
            capability.SetCapability(CapabilityType.BrowserName, "chrome");

            IWebDriver driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"), capability);

I get an exception almost immediately:

{"cannot find : {platform=windows, browserName=chrome, version=12}"}

It seems as if the node isn't even being found. I am new to this is it something I have missed in the set up? (internet explorer does the same and changing versions doesn't seem to help).

I have searched for hours and hours but nothing that matches the exception seems as generic as my problem.

5 Answers
Related