0

I have an error in my Jenkins + Selenium integration, the Selenium Grid Version is 3.7.1 (Installed by default for the Jenkins Selenium Plugin). I'm using the last chromedriver version. When I run my test on Jenkins the I get the following errors:

org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService

Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: 'xxxxxxx', ip: 'xxxxxxxx', os.name: 'Windows Server 2012 R2', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_66'
Driver info: driver.version: unknown
Command duration or timeout: 187 milliseconds
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
    at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
    at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
    at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
    at com.xxxxxxxx.util.utilities.DriverUtils.configureDriver(DriverUtils.java:47)
    at com.xxxxxxxxx.features.accederSistema.iniciarSesion.CP01IniciarSesion.openNavigatorToLogin(CP01IniciarSesion.java:52)
1

1 Answer 1

0

You need to check your ChromeDriver path.

For this example code,

System.setProperty("webdriver.chrome.driver","D://selenium/chromedriver.exe");
cap = DesiredCapabilities.chrome();
cap.setPlatform(org.openqa.selenium.Platform.WINDOWS);
browser = new RemoteWebDriver(new URL("http://localhost:4444/hub"),cap);

Check and ensure that the chromedriver.exe file is actually available on the said path ("D://selenium/chromedriver.exe") and has executable permission assigned to it.

This whould help resolve your issue.

3
  • You literally answered my question 4 years later haha
    – Nic
    Dec 21, 2021 at 16:54
  • So it worked? If so might be a good idea to mark it as accepted answer. Dec 22, 2021 at 1:38
  • I don't know I'm not a QA analyst anymore lmao
    – Nic
    Dec 23, 2021 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.