Unknown error: cannot find Chrome binary

From Test Automation Wiki
Jump to: navigation, search

Sometimes selenium is not able to find the binary automatically. In that case, you have to manually add the location of the browser installation.

This can have multiple causes: 1. You don't have Chrome installed 2. Chrome has not been installed on a default location 3. You're on a managed operating system

If you're on a managed operating system, it is probably the easiest to install Chrome Portable

Once you have chrome installed, you can add the following to your code, before you try to start the browser:

require 'selenium-webdriver'
Selenium::WebDriver::Chrome::path = 'C:\Path\To\Your\Installation\Of\Chrome.exe'