0

I've written Java 8 + GUI in Swing + Selenium 3.0.0-beta (to get some data from web) application (IDE: Intellij Idea), exported to .jar - it works correctly on Windows 10, Windows 7 with JRE installed. Unfortunately i have to start it on Mac - it launches, but error appears:

IllegalStateException - geckodriver not executable.

I found a clue to add in my project:

System.setProperty("webdriver.gecko.driver", "path");

but it doesn't work with either geckodriver.exe nor geckodriver for Mac. Can You provide any solution or workaround to that problem?

gooornik07
  • 99
  • 12

2 Answers2

1

According to the error you were getting, it does not have the appropriate permissions.

IllegalStateException - geckodriver not executable.

Open up a terminal in the Mac, and execute this:

$ chmod +x geckodriver

and that should fix it.

ddavison
  • 28,221
  • 15
  • 85
  • 110
0

Rely on WebDriverManager to handle the proper geckodriver for your platform (Mac OS X):

FirefoxDriverManager.getInstance().setup();
Boni García
  • 4,618
  • 5
  • 28
  • 44