Chomedriver "Driver is not feasible"

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."

+5
source share
2 answers

Make it executable: On CentOs, use chmod +x chromedriver

+15
source
  • If the user is using Unix, this time first checks the folder permission or chrome permission.
  • There is no permission, so use the command below.
  • chmod 777 *
  • Permission to change the shift folder has been issued and the problem will be fixed.
0
source

Source: https://habr.com/ru/post/1202059/


All Articles