Note that there are some explanatory texts on larger screens.

plurals
  1. POSelenium Grid 2 using RemoteWebDriver throwing spurious exception
    primarykey
    data
    text
    <p>I've got a Play! Framework application (based on v1.2.3) using the WebDrive module (based on v0.2) to run the Selenium tests in a browser through WebDriver. I've customised this module to allow me to fire up a RemoteWebDriver to run the tests on another machine.</p> <p>If I connect this RemoteWebDriver directly to a standalone Selenium server (using v2.14) then everything works fine.</p> <p>If I set up a Grid configuration with a hub server and a node server that registers with the hub, and then point the RemoteWebDriver at the hub, I get this exception:</p> <pre><code>Exception in thread "main" org.openqa.selenium.WebDriverException: Could not start Selenium session: org%2Eopenqa%2Egrid%2Ecommon%2Eexception%2EGridException%3A+Error+forwarding+the+new+session+cannot+find+%3A+%7BbrowserName%3D%2Achrome%7D; duration or timeout: 59 milliseconds Build info: version: '2.14.0', revision: 'unknown', time: '2011-11-29 13:13:16' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-34-generic', java.version: '1.6.0_26' Driver info: driver.version: RemoteWebDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:147) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:113) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:400) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:115) at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:76) at play.modules.webdrive.WebDriverRunner.runRemote(WebDriverRunner.java:204) at play.modules.webdrive.WebDriverRunner.runDecider(WebDriverRunner.java:64) at play.modules.webdrive.WebDriverRunner.main(WebDriverRunner.java:56) Caused by: java.lang.RuntimeException: Could not start Selenium session: org%2Eopenqa%2Egrid%2Ecommon%2Eexception%2EGridException%3A+Error+forwarding+the+new+session+cannot+find+%3A+%7BbrowserName%3D%2Achrome%7D at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:123) at org.openqa.selenium.internal.selenesedriver.NewSession.apply(NewSession.java:34) at org.openqa.selenium.internal.selenesedriver.NewSession.apply(NewSession.java:30) at org.openqa.selenium.SeleneseCommandExecutor.execute(SeleneseCommandExecutor.java:132) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:382) ... 5 more </code></pre> <p>I am specifying in my capabilities that I want a "firefox" driver, not a "* chrome" one. I've seen that "*<em>browser name</em>" is the older style Selenium RC definition, but I'm not using that anywhere, only the RemoteWebDriver style definition.</p> <p>Here's the relevant part of the code:</p> <pre><code>DesiredCapabilities capabilities = new DesiredCapabilities(); // capabilities.setBrowserName("firefox"); capabilities = DesiredCapabilities.firefox(); System.out.println("&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;" + capabilities.getBrowserName()); CommandExecutor executor = new SeleneseCommandExecutor(new URL(System.getProperty("webdrive.remoteUrl")), new URL(appUrlBase + "/@tests/init"), capabilities); WebDriver webDriver = new RemoteWebDriver(executor, capabilities); System.out.println("~ Starting tests remotely with " + capabilities.getBrowserName()); runTests(seleniumTests, webDriver); </code></pre> <p>and it falls over on the line where I create the new RemoteWebDriver. I've tried both methods of setting the browser and the sysout confirms that it is in there correctly. I never get to see the second sysout.</p> <p>What am I doing wrong? :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload