I am only starting to use GitLab as CI tool. I have created autotests using stack: Java, Cucumber, Maven. I have created gitlab-ci.yml with next settings:
image: maven:latest
stages:
- test
test:
stage: test
script:
- mvn clean test -Dtest=RunCucumberTest
But Pipeline is failed with next errors:
java.lang.IllegalStateException: The driver is not executable: /builds/<user>/cucumber-testing/./src/drivers/chromedriver_99.exe
at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:150)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:141)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:35)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:159)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:94)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at seleniumActions.ActionWithElement.setUp(ActionWithElement.java:24)
at stepDefinition.Hooks.setUp(Hooks.java:14)
How do I set up ChromeDriver for gitlab in my .yml file?
GitLab docker jobs execute in Linux docker containers. Your executable (.exe
file) is a win32 binary and cannot be used in jobs running in Linux containers.
Download the linux chromedriver and specify that file instead.