1

WebDriver cannot be initialised when selenium-server-standalone is run as Windows service.

I'm connecting with Windows machine from Jenkins on centOS using SSH.

On Windows I installed selenium-server-standalone as service using nssm, so I run following command:

nssm start SeleniumWebDriver

The service is run as the same local Windows user that I'm using to log in.

The command is working correctly as I can see the process running in Task Manager and I'm able to access the hub and create the Chrome session.

But when the next step in Jenkins job is run, that is tests, it fails immediately because the WebDriver cannot be initialised.

When I run manually on Windows selenium-server-standalone (not as a service), the tests are executed because Chrome is being open. When run through service, Chrome is open but somewhere in the background (probably another session) and I and the tests cannot see the window.

How to change it to make the Chrome appearing so the WebDriver could be initialised and GUI actions be performed?

  • What do the Jenkins logs say? Is there a stacktrace that points to the failure? Also...how is your CentOS target configured (i.e is it setup to run GUI-based tests? Xvfb installed?). – orde Jul 04 '19 at 20:32
  • The test are run on Windows and it's able to run these tests because they are run correctly when I start manually the selenium standalone server, it is open then in visible session together with Chrome. The question is how to open these apps in visible session using SSH connection. – johnnyguitar Jul 05 '19 at 05:06

0 Answers0