I have my chromedriver and chromedriver.exe right in the project folder. I am creating a driver instance with this code.
ChromeOptions options = new ChromeOptions(); DesiredCapabilities capabilities = DesiredCapabilities.firefox(); LoggingPreferences log_prefs = new LoggingPreferences(); log_prefs.enable(LogType.BROWSER, Level.SEVERE); capabilities.setCapability(CapabilityType.LOGGING_PREFS, log_prefs); System.setProperty("webdriver.chrome.driver", "chromedriver"); driver = new ChromeDriver(capabilities); driver.manage().window().maximize();
And this is normal in local windows (if we change "chromedriver" to "chromedriver.exe"), but when I run it on CentOS, I got the error message: "The driver is not executable."
source share