1

Python 3.7.3

Pycharm 2019.1.3

selenium standalone 3.14.0

Selenium 3.141.0

Java JDK 12.0.2

Windows 7

When I try to run script using remote webdriver a got the error, my java.version is not what I expected (expected version at least 12.):

selenium.common.exceptions.SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'host_name', ip: 'localhost', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_221'
Driver info: driver.version: unknown
Stacktrace:
    at org.openqa.selenium.remote.server.ServicedSession$Factory.lambda$get$0 (ServicedSession.java:134)
    at org.openqa.selenium.remote.server.ServicedSession$Factory.apply (ServicedSession.java:151)
    at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12 (ActiveSessionFactory.java:177)
    at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
    at java.util.stream.ReferencePipeline$11$1.accept (None:-1)
    at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
    at java.util.Spliterators$ArraySpliterator.tryAdvance (None:-1)
    at java.util.stream.ReferencePipeline.forEachWithCancel (None:-1)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel (None:-1)
    at java.util.stream.AbstractPipeline.copyInto (None:-1)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (None:-1)
    at java.util.stream.FindOps$FindOp.evaluateSequential (None:-1)
    at java.util.stream.AbstractPipeline.evaluate (None:-1)
    at java.util.stream.ReferencePipeline.findFirst (None:-1)
    at org.openqa.selenium.remote.server.ActiveSessionFactory.apply (ActiveSessionFactory.java:180)
    at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2 (NewSessionPipeline.java:65)
    at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
    at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
    at java.util.Collections$2.tryAdvance (None:-1)
    at java.util.stream.ReferencePipeline.forEachWithCancel (None:-1)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel (None:-1)
    at java.util.stream.AbstractPipeline.copyInto (None:-1)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (None:-1)
    at java.util.stream.FindOps$FindOp.evaluateSequential (None:-1)
    at java.util.stream.AbstractPipeline.evaluate (None:-1)
    at java.util.stream.ReferencePipeline.findFirst (None:-1)
    at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3 (NewSessionPipeline.java:68)
    at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
    at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
    at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
    at java.util.stream.DistinctOps$1$2.accept (None:-1)
    at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
    at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
    at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
    at java.util.stream.Streams$StreamBuilderImpl.tryAdvance (None:-1)
    at java.util.stream.Streams$ConcatSpliterator.tryAdvance (None:-1)
    at java.util.stream.ReferencePipeline.forEachWithCancel (None:-1)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel (None:-1)
    at java.util.stream.AbstractPipeline.copyInto (None:-1)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (None:-1)
    at java.util.stream.FindOps$FindOp.evaluateSequential (None:-1)
    at java.util.stream.AbstractPipeline.evaluate (None:-1)
    at java.util.stream.ReferencePipeline.findFirst (None:-1)
    at org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession (NewSessionPipeline.java:71)
    at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute (BeginSession.java:65)
    at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$3 (WebDriverServlet.java:250)
    at java.util.concurrent.Executors$RunnableAdapter.call (None:-1)
    at java.util.concurrent.FutureTask.run (None:-1)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (None:-1)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (None:-1)
    at java.lang.Thread.run (None:-1)

I've tried to reinstall java JDK but version stay the same as was - 1.8.0_221

My code in python:

driver = webdriver.Remote(
   command_executor='http://10.20.10.193:4444/wd/hub',
   desired_capabilities=DesiredCapabilities.CHROME)

driver.get('https://google.com')

set selenium server:

java -jar selenium-server-standalone-3.14.0.jar

what I'm doing wrong?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Krzy
  • 83
  • 7
  • Do you have node registered on hub? Also version of Chrome & chrome driver .Are they compatible ? – Rahul L Aug 12 '19 at 13:28
  • no i don't have node registered on hub - gonna try it. Yes Chrome and chrome driver version ale compatible v76. – Krzy Aug 12 '19 at 13:37
  • 2
    http://allselenium.info/execute-python-selenium-tests-in-selenium-grid/ Check tutorial. Without node test will not run. – Rahul L Aug 12 '19 at 13:38
  • still something wrong, but i will get it from now, thank you good man. – Krzy Aug 12 '19 at 14:04

1 Answers1

1

This error message...

selenium.common.exceptions.SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'host_name', ip: 'localhost', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_221'
Driver info: driver.version: unknown

...implies that the ChromeDriver is not getting recognized.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

Selenium Client Driver page mentions:

So possibly Python 3.7.3 is still not supported and you may have to downgrade python to a relevant version.


Outro

Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11

keramat
  • 4,328
  • 6
  • 25
  • 38
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352