I am downloading the trunk as of 22/05/2011 and building with 'go
release'. I'm then navigating to 'build\java\server\src\org\openqa\grid
\selenium' and launching a hub from there with the following command
line:
java -jar selenium-standalone.jar -role hub
Currently I am testing with a grid machine as the local one. So I run
another instance locally except this time of a webdriver which
connects to the hub I just launched:
java -Dwebdriver.chrome.driver="C:\Users\Mike\Desktop
\chromedriver.exe" -jar selenium-standalone-jar -role webdriver -port
12345 -hub
http://localhost:4444/grid/register
Going to
http://localhost:4444/grid/console in a browser, I can see
one WebDriverRemoteProxy supporting 5 concurrent tests from 5
firefoxs, 1 internet explorer and 1 chrome. I am using the following
code from an eclipse project:
public class Grabber {
public static void main(String[] args) throws MalformedURLException
{
RemoteWebDriver driver = new RemoteWebDriver( new URL("http://
localhost:4444/grid/driver"),
DesiredCapabilities.internetExplorer() );
driver.get("
http://www.google.com");
driver.quit();
}
}
Having the DesiredCapabilities as Chrome or Firefox works perfectly.
Having it as Internet Explorer gives the following error:
Exception in thread "main" org.openqa.selenium.WebDriverException:
<html>
<head>
<title>Error 500 cannot find : {platform=WINDOWS,
ensureCleanSession=true, browserName=internet explorer, version=}</
title>
</head>
<body>
<h2>HTTP ERROR: 500</h2><pre>cannot find : {platform=WINDOWS,
ensureCleanSession=true, browserName=internet explorer, version=}</
pre>
<p>RequestURI=/grid/driver/session</p>
<p><i><small><a href="
http://jetty.mortbay.org">Powered by
Jetty://</a></small></i></p>
</body>
</html>
System info:
os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1',
java.version: '1.6.0_24'
Driver info: driver.version: RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:
131)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:
105)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
409)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:
103)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
86)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
94)
at Grabber.main(Grabber.java:9)
I also tried running the connecting webdriver as :
java -Dwebdriver.chrome.driver="C:\Users\Mike\Desktop
\chromedriver.exe" -jar selenium-standalone.jar -role webdriver -port
12345 -hub
http://localhost:4444/grid/register -browser
browserName="internet explorer"
Going to the console I can see one internet explorer instance is
available. Running the eclipse code generates the same exception
however.
If it's relevant I am running on windows 7 and I have IE9 installed.
The following code works fine on the local machine:
public static void main(String[] args) throws MalformedURLException
{
WebDriver driver = new InternetExplorerDriver();
driver.get("
http://www.google.com");
driver.quit();
}
Is there something I'm doing wrong or is this a known bug?