Hi there, I’m trying to get a Selenium automated testing suite (Cucumber/Gherkin) to run in a Jenkins Automated build pipeline.
The main project is in Java, I have a Linux chromedriver which the Java project references. On build, it is failing before tests are actually run:
selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary
My assumption is that either of the following is true:
Either the container is not the expected base image OS, but I don’t think that is the case
or, more likely, the container does not have Chrome installed so that the Chromedriver cannot reference it. I had a similar problem when working with Azure, and had to use a Docker container in order to get Chrome to work in Selenium within the container. I tried using the same build commands in pre steps via Jenkins UI and wasn’t able as apt-get is not a relevant command, nor is apt install, nor is dnf or yum or any of the others I have tried.
What am I missing here? How can I go about accomplishing this?