Php-webdriver: The path to the driver executable must be set by the webdriver.gecko.driver system property

Created on 14 Feb 2017  路  4Comments  路  Source: php-webdriver/php-webdriver

If I run example.php by navigating to this url: http://localhost/selenium_standalone/example.php then I get this error:

Fatal error: Uncaught Facebook\WebDriver\Exception\UnknownServerException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases in C:\xampp\htdocs\selenium_standalone\vendor\facebook\webdriver\lib\Exception\WebDriverException.php:114 Stack trace: #0 C:\xampp\htdocs\selenium_standalone\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php(321): Facebook\WebDriver\Exception\WebDriverException::throwException(13, 'The path to the...', Array) #1 C:\xampp\htdocs\selenium_standalone\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php(121): Facebook\WebDriver\Remote\HttpCommandExecutor->execute(Object(Facebook\WebDriver\Remote\WebDriverCommand)) #2 C:\xampp\htdocs\selenium_standalone\example.php(17): Facebook\WebDriver\Remote\RemoteWebDriver::create('http://localhos...', Object(Facebook\WebDriver\Remote\DesiredCapabilities), in C:\xampp\htdocs\selenium_standalone\vendor\facebook\webdriver\lib\Exception\WebDriverException.php on line 114

question waiting for reaction

Most helpful comment

You can pass the geckodriver binary path to the Selenium server like this:
java -Dwebdriver.gecko.driver="/usr/bin/geckodriver" -jar selenium-server-standalone-3.3.1.jar

All 4 comments

Hi @Eddcapone, thanks for the report, but I have to close the issue, sorry - if you still experience the problem, please fill the issue template which is provided when creating a new issue - it helps us diagnose the problem and help you :).

Thank you!

I was able to solve it by installing gecko and passing gecko to the selenium server as parameter

@Eddcapone Could you please elaborate more on what you mean by passing to the webserver as parameter?

You can pass the geckodriver binary path to the Selenium server like this:
java -Dwebdriver.gecko.driver="/usr/bin/geckodriver" -jar selenium-server-standalone-3.3.1.jar

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

bscheshirwork picture bscheshirwork  路  4Comments

Gadzillion picture Gadzillion  路  6Comments

rakeshbitling picture rakeshbitling  路  4Comments

andrewnicols picture andrewnicols  路  9Comments