Unable to create WebDriver instance on Selenium 3.0 Grid / Node

2.8k views Asked by At

Trying to run some Selenium tests locally using Selenium 3.0 but get the following error:

org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, screen-resolution=1680x1050, commandTimeout=300, record-video=true, version=50.1.0, platform=MAC, tags=[Ljava.lang.String;@1ac4da8f, build=jgilmore-12291406, idleTimeout=120, name=homePageSmokeTest, browserName=firefox, seleniumVersion=null, maxDuration=360}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700

Currently running the Selenium Hub as follows:

java -jar /Users/jgilmore/Selenium/selenium-server-standalone-3.0.1.jar -role hub -timeout 15

And the Node (trying to run Firefox 50.1.0 with Geckodriver first):

java -Dwebdriver.gecko.driver=/Users/jgilmore/Selenium/geckodriver -jar selenium-server-standalone-3.0.1.jar -port 5557 -role node -hub http://localhost:4444/grid/register -browser "browserName=firefox, browserVersion=50.1.0, maxInstances=10"

The Grid and Node startup just fine (see them in the Grid Console), but I can't create a WebDriver instance when trying to run my test(s). This used to work for me with Selenium 2.x, so I am assuming I'm missing something here. Any help is appreciated!

1

There are 1 answers

0
jaredgilmore On BEST ANSWER

So with the help of gasalis, I think we figured out my issue:

  1. Change browserVersion to version on both the Node and my local configuration.
  2. For whatever reason, I have to set the browser version for Firefox and Chrome to ANY -- I can't explicitly state the browser version such as "50.1.0" for Firefox or "55" for Chrome. Probably something I'm missing, but that's an issue for another question.

By changing those two things, I can now successfully create the WebDriver(s) necessary to run my local Selenium scripts.

Thanks for your help gsaslis!