I have jenkins which is running on Linux box and Whenever I tried to run the below script its failing and says the driver is not executable.
java.lang.IllegalStateException: The driver is not executable: /COMPLIANCE-48/workspace/AutoProfile_Exec/Driver/chromedriver
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
Code:
String getLocation=System.getProperty("chromePath");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
System.setProperty("webdriver.chrome.driver",getLocation);
WebDriver iDriver = new ChromeDriver(chromeOptions);
The below is mvn command:
-U clean compile exec:java -DchromePath="${WORKSPACE}/Driver/chromedriver"
Actually I have placed the chromedriver in that specific path and passing it as an argument. But not sure why it's saying driver is not executable.