Selenium throws an error selenium common exceptions WebDriverException

0 votes

With the message: unknown error: cannot find Chrome binary” on Mac

I was using Selenium with Python 3 for web scraping purposes:

from selenium import webdriver

chrome_path = r"/Library/Frameworks/Python.framework/Versions/3.6/bin/chromedriver"

driver = webdriver.Chrome(chrome_path)

I got an error

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

May 8, 2018 in Selenium by Martin
• 4,320 points
17,045 views

1 answer to this question.

0 votes
In your case the path of the chrome 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
answered May 8, 2018 by Samarpit
• 5,910 points

Related Questions In Selenium

+1 vote
4 answers
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,468 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,022 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,135 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,812 views
0 votes
2 answers

Selenium Webdriver Error: org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'

Facing Error Exception in thread "main" org.openqa.selenium .WebDriverException: unknown ...READ MORE

answered Mar 5, 2020 in Selenium by anonymous
10,119 views
0 votes
1 answer

How to eliminate this error”Cannot instantiate the type Select in selenium webdriver”

Try below code. Select sc = new Select(driver.findElement(By.xpath("your ...READ MORE

answered May 18, 2018 in Selenium by Samarpit
• 5,910 points
9,909 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP