MAC Osx - Illegalstateexception: the Driver Is Not Executable:

Mac OSX - IllegalStateException: The driver is not executable:

Quick installation of the latest ChromeDriver

To install the latest version of ChromeDriver:

  • Mac users with Homebrew:

    brew tap homebrew/cask && brew cask install chromedriver


Original answered Nov 15 '17 at 12:04

The error IllegalStateException: The driver is not executable: /Users/roja/Documents/GitHub/testautomation/chromedrivers/chromedriver_osx says it all. You have to make exactly 4 changes as follows :

  • Change Webdriver.chrome.driver as :

    webdriver.chrome.driver
  • Change /Users/roja/Automation/chromedriver_osx as we need to include the name of the webdriver binary i.e. chromedriver as a value :

    /Users/roja/Automation/chromedriver_osx/chromedriver
  • Change driver = new ChromeDriver(); as :

    WebDriver driver = new ChromeDriver();
  • Remove unwanted throws InterruptedException to keep your code short and simple.

ERROR : java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property;

Please check your browser version as well. because selenium 2.X not support firefox 47+ versions.



Related Topics



Leave a reply



Submit