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:
Download the latest stable gecko driver & place it in a folder in "C:\abc".
Rename the gecko driver to geckodriver.exe
Download and install the latest released Mozila Firefox.
Ensure you are using either 32 bit or 64 bit for both.
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
Rails Routes: Get Without Param :Id
How to Convert Utf8 Combined Characters into Single Utf8 Characters in Ruby
How to Change Passenger Ruby Version Without Recompiling
Printing Elements of Array Using Erb
Alter $Path in Vim/Macvim So as to Find the Right Ruby Binary
Turn on Full Backtrace in Ruby on Rails Testcase
Disable Rdoc and Ri Generation by Default for Rubygems 1.8.X
Simple Conversion of String to Utf-8 in Ruby 1.8
Why Does Ruby Only Permit Certain Operator Overloading
Rails:Runtimeerror - Can't Modify Frozen Array When Running Rspec in Rails
Ftps (Tls/Ssl) from Ruby on Rails App
How to Delete a Range of Values from an Array
Telling Bundler to Exclude Certain Gems from a Particular Gem's Installation
Instance Variable, Class Variable and the Difference Between Them in Ruby
Ruby Elegant Way to Return Min/Max If Value Outside Range