10

I received this error: "WebDriverException: Message: 'chromedriver' executable needs to be in PATH." The only way I was able to fix it was to manually add one of the locations of chromedriver like this:

driver = webdriver.Chrome("/Users/anncolvin/.rvm/bin/chromedriver")

After Chrome launched, I then received this error: "You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer."

I'd like to try using the following code to address this new error but I don't know how/if I can combine it with manually specifying chromedriver's location?

options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["ignore-
certificate-errors"])
browser = webdriver.Chrome(chrome_options=options)
browser.get("http://google.com/")
Ann Colvin
  • 101
  • 1
  • 1
  • 5

1 Answers1

12

All you have to do is specify the webdriver location as an argument when calling the Chrome webdriver like so:

chrome_path = r"/Users/anncolvin/.rvm/bin/chromedriver"
browser = webdriver.Chrome(chrome_path, chrome_options=options)
Cezar Cobuz
  • 1,077
  • 1
  • 12
  • 34
kurczynski
  • 359
  • 9
  • 17