close

[Solved] Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac Error Occurs?

Today I get the following error Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac in python.

How To Solve Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac Error ?

  1. How To Solve Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac Error ?

    To Solve Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac Error I have met this annoying problem when I am lerning selenium. This is my solution: (MacOS 10.13.4)

  2. Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac

    To Solve Selenium gives “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” on Mac Error I have met this annoying problem when I am lerning selenium. This is my solution: (MacOS 10.13.4)

Solution 1

The issue is that chromedriver also needs to know where chrome is. In your case it is at a non-default path. So you need to specify the complete path to the Google Chrome binary.

options = webdriver.ChromeOptions()
options.binary_location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
chrome_driver_binary = "/usr/local/bin/chromedriver"
driver = webdriver.Chrome(chrome_driver_binary, chrome_options=options)

Above code is what you should use

Solution 2

I have met this annoying problem when I am lerning selenium. This is my solution: (MacOS 10.13.4)

  1. uninstall my chrome
  2. use homebrew to install chromedriver: brew cask install chromedriver
  3. use homebrew to install chrome: brew cask install google-chrome

Thanks to homebrew now chrome and chromedriver are installed in the same folder and this problem will be automatically solved.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read