E
E
Eugene2020-02-11 02:02:06
Python
Eugene, 2020-02-11 02:02:06

Is it possible not to manually prescribe the path of chromedriver.exe?

Tried this code:

from selenium import webdriver
import os

path = (os.path.abspath('chromedriver.exe'))

browser = webdriver.Chrome(path)

Writes
Message: 'chromedriver.exe' executable needs to be in PATH.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Yakushenko, 2020-02-11
@evgentor

Yes, you can add the chrome driver to the environment variables and then you can not specify the path when initializing the driver. Here's the guide , if anything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question