Reputation: 149
Using ruby 1.9.3 and the latest version of watir-webdriver i get the following error when running a test script:
C:/.../selenium/webdriver/firefox/binary.rb:120in 'path': Could not find Firefox binary (os-windows). Make sure Firefox is installed or set the path manually with Selenium::Webdriver::Firefox::Binary.path=
I only just started getting this error after installing an older version of firefox in addition to a current version. I am using watir-webdriver NOT selenium webdriver. Here are my requires
require 'highline/import'
require 'watir-webdriver'
require 'win32console'
require 'term/ansicolor'
require 'base64'
Error is with this line:
browser = Watir::Browser.new :ff
I have uninstalled all versions of firefox and Ruby, and reinstalled only the latest. The firefox installation directory is in my PATH. Thanks in advance for any ideas.
Upvotes: 3
Views: 4716
Reputation: 1
try this also, take the path where mozilla exe is installed.
<WebDriver::Firefox::Binary.path='C:\Program Files\Mozilla Firefox\firefox.exe'
=> "C:\\Program Files\\Mozilla Firefox\\firefox.exe"
Upvotes: -1
Reputation: 149
Added this line after my 'requires' section and it works
Selenium::WebDriver::Firefox::Binary.path='C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
Upvotes: 4