Ruby Selenium Webdriver Unable to Find Mozilla Geckodriver

Ruby selenium webdriver unable to find Mozilla geckodriver

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

Selenium keep trying to find geckodriver, even when I think I've set it up with Chromedriver while using Ruby 2.3.3

You need to register a driver with a specific configuration to tell Capybara to use a different browser - https://github.com/teamcapybara/capybara#configuring-and-adding-drivers. However, if all you want is Selenium using Chrome with a default setup then Capybara already has a driver registered for you - https://github.com/teamcapybara/capybara#selenium

Capybara.default_driver = :selenium_chrome

That will require you to have chromedriver installed (which the chromedriver-helper gem will do for, although I would recommend using the webdrivers gem instead). If you don't want to use selenium/chromedriver then there are a couple of newer options which talk directly to Chrome, one of which is the appartion driver - https://github.com/twalpole/apparition

Cronjob - Unable to find Mozilla geckodriver

It could be that your export is located in place which is not called by cron daemon.

To investigate that replace your cronjob with echo $PATH >> /tmp/crontab.log and then check '/tmp/crontab.log' for PATH and check if /usr/local/bin is there.

Another reason could be that cron daemon is running as different user and thus has no access to geckodriver. Check ls -la /usr/local/bin | grep gecko. If that's the case, please checkout this SO question

Selenium webdriver 3.3.0 geckodriver error for firefox

It is clear from the error message which is Unable to find Mozilla geckodriver and place it somewhere on your PATH

Here is what you need to do:

  1. Download the latest stable gecko driver & place it in a folder in "C:\abc".

  2. Rename the gecko driver to geckodriver.exe

  3. Download and install the latest released Mozila Firefox.

  4. Ensure you are using either 32 bit or 64 bit for both.

  5. Keep your code like:

    System.setProperty("webdriver.gecko.driver", "C:\\abc\\geckodriver.exe");
    WebDriver driver = new FirefoxDriver();
    driver.manage().window().maximize();
    driver.get("http://gmail.com");

Let me know if it works for you.

selenium webdriver 3.0.1 geckodriver error for firefox

Add the geckodriver.exe to your path as suggested:

Control Panel->System->Advanced system settings->Environment variables.



Related Topics



Leave a reply



Submit