Ruby selenium webdriver unable to find Mozilla geckodriver

user2968505 picture user2968505 · Dec 24, 2016 · Viewed 24.7k times · Source

I have geckodriver installed in my development directory

ls | grep geckodriver
geckodriver
geckodriver-v0.11.1-linux64.tar.gz

I also exported to the $PATH variable

export PATH=$PATH:~/Development/geckodriver

But when I attempt to initialize an instance of the webdriver on rails console of my project I get this

driver = Selenium::WebDriver.for :firefox

Selenium::WebDriver::Error::WebDriverError: Unable to find Mozilla geckodriver. Please download the server from https://github.com/mozilla/geckodriver/releases and place it somewhere on your PATH. More info at https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver What's the issue here.

Answer

Karthick Nagarajan picture Karthick Nagarajan · Dec 24, 2016

You have selenium-webdriver-3.0.0.beta3.1 which is only for Firefox 48 and later (and not yet properly working). Fallback to selenium-webdriver version 2.53.4 and try again.

And also try this..

  • In the terminal change directory path to the directory where gem was installed
  • Run gem uninstall selenium-webdriver
  • Run gem install selenium-webdriver -v 2.53.4