Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chomedriver "The driver is not executable"

I have my chromedriver and chromedriver.exe right in project folder. I'm creating instance of driver 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 it's ok on local windows (if we change "chromedriver" to "chromedriver.exe") , but when i'm running it on CentOS i got error message: "The driver is not executable".

like image 223
Ghostleg Avatar asked Sep 08 '14 09:09

Ghostleg


People also ask

How do I make a Chrome driver executable on Mac?

If you want you can add a specific path here and you can move the chromedriver to this folder but as you see, /usr/local/bin folder is defined as a path by default. Now, go to your downloads folder, find the chromedriver_mac64. zip file and unpack it. You will see the chromedriver executable file.

How do I install Chromedriver executable to path?

Go to the terminal and type the command: sudo nano /etc/paths. Enter the password. At the bottom of the file, add the path of your ChromeDriver. Type Y to save.

What is Chromedriver executable?

ChromeDriver is a separate executable that Selenium WebDriver uses to control Chrome. It is maintained by the Chromium team with help from WebDriver contributors. If you are unfamiliar with Selenium WebDriver, you should check out the Selenium site.


1 Answers

Make it executable: In CentOs use chmod +x chromedriver

like image 101
German Petrov Avatar answered Sep 22 '22 19:09

German Petrov