0
votes

java.version: '12.0.1'

selenium server Build info: version: '3.141.59'

firefox version = 68

python version = Python 3.7.2

I try running firefox on selenium grid and get the following error: selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: '*****', ip: '******', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '12.0.1' Driver info: driver.version: unknown

This is how i set up the grid:

java -jar selenium-server-standalone-3.141.59.jar -port 4444 -role hub

on the second cmd window i initiate the firefox node like so

java -Dwebdriver.gecko.driver=C:\Selenium\geckodriver.exe -jar selenium-server-standalone-3.141.59.jar -port 5557 -role node -browser "browserName=firefox,platform=WINDOWS,maxInstances=1"

I have tried several mix of capability options including using a more detailed both from a json file(capability list) and within my python script to set up the firefox node but i still get the same error.

This is my python script code:

from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

cap = DesiredCapabilities.FIREFOX.copy()

cap['browserName'] = 'firefox'
cap['platform'] = "WINDOWS"

driver = webdriver.Remote(command_executor='http://localhost:4444/wd/hub',
                          desired_capabilities=cap)
driver.get("https://www.google.co.in/")
print(driver.title)
driver.quit()

I also get a remote stacktrace error like this on my cmd window:

remote stacktrace: 
Stacktrace:
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstanceWithCaller (Constructor.java:500)
    at java.lang.reflect.Constructor.newInstance (Constructor.java:481)
    at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0 (W3CHandshakeResponse.java:62)
    at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0 (HandshakeResponse.java:30)
    at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0 (ProtocolHandshake.java:126)
    at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195)
at java.util.Spliterators$ArraySpliterator.tryAdvance (Spliterators.java:958)
    at java.util.stream.ReferencePipeline.forEachWithCancel (ReferencePipeline.java:127)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel (AbstractPipeline.java:502)
    at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:488)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474)
    at java.util.stream.FindOps$FindOp.evaluateSequential (FindOps.java:150)
    at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.findFirst (ReferencePipeline.java:543)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession (ProtocolHandshake.java:128)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession (ProtocolHandshake.java:74)
    at org.openqa.selenium.grid.session.remote.RemoteSession$Factory.performHandshake (RemoteSession.java:147)
    at org.openqa.selenium.grid.session.remote.ServicedSession$Factory.apply (ServicedSession.java:161)
    at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12 (ActiveSessionFactory.java:180)
    at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195)
    at java.util.stream.ReferencePipeline$11$1.accept (ReferencePipeline.java:442)
    at java.util.stream.ReferencePipeline$2$1.accept (ReferencePipeline.java:177)
    at java.util.Spliterators$ArraySpliterator.tryAdvance (Spliterators.java:958)

It's pretty lengthy... I can attach the rest of it to the question if requested...

1

1 Answers

0
votes

I would recommend downgrading to Java 8 and using a config.json file for your node like this:

 {
   "capabilities": [
      {
       "browserName": "firefox",
       "platform": "WIN7",
       "maxInstances": 5
      }
   ],
   "hub": "http://<hub ip>:<hub port>"
  }