pythonmacosbrowsersplinter

Python + Browser with Mac: Error - 'chromedriver' executable needs to be in PATH


I did the following but came across the error:

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

from splinter import Browser

browser = Browser('chrome')

How can I go about resolving the issue using Mac?

Thank you in advance and will be sure to upvote/accept answer!


Solution

  • The easiest way to resolve this is on a Mac is to:

    brew install --cask chromedriver
    

    Splinter and similar frameworks for browser automation rely on external modules being installed and callable in PATH.

    Edit: chromedriver migrated from homebrew/core to homebrew/cask