I am using Watir to crawl something, but it throw
Unable to find Mozilla geckodriver. Please download the server from https://github.com/mozilla/geckodriver/releases and place it
I've done following step.
Downloading the latest firefox (version50.0)
I download the latest version of geckodriver
from https://github.com/mozilla/geckodriver/releases, and put it in ~/geckodriver
Then add export PATH=$PATH:~/geckodriver
into ~/.bash_profile
and source it.
Here is code I executed
require 'watir-webdriver'
browser = Watir::Browser.new :firefox # should open a new Firefox window
browser.goto 'http://nitrowriters.com/form/form.html' # or type the local path to your downloaded copy
Gemfile
source "https://rubygems.org"
gem 'nokogiri'
gem 'watir-webdriver'
gem 'open_uri_redirections'
gem 'selenium-webdriver'
gem "watir", ">= 6.0.0.beta2"
Environment: OSX 10.10
Click on the Environment Variables button. From System Variables select PATH. Click on the Edit button. Paste the path of the GeckoDriver file.
I had the same problem on Linux Mint 17.2. I solved it by moving the geckodriver
file from the extracted tar to usr/bin
(you have to have root permission to do that).
For some reason zsh would not find it if I defined it in my path
variable. Maybe someone else has a better solution, but for now this works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With