Home > other >  'chromedriver the executable needs to be in the PATH.' error problem solving
'chromedriver the executable needs to be in the PATH.' error problem solving

Time:11-20

Tried the chromedriver. Exe in chrome installation file, python installation file, and then put the path to the path, all useless;
Finally is directly modify function call:

The from the selenium import webdriver

Browser=webdriver. Chrome (executable_path='C: \ Program Files \ (x86) Google, Chrome, Application, chromedriver. Exe')
The get (' http://www.baidu.com ')
Or at the wrong, however, can find the use of online methods are used, is still the 'chromedriver the executable needs to be in the PATH

CodePudding user response:

Note browser version and chromedirver version match, the online version of matching table

CodePudding user response:

reference 1st floor chuifengde response:
note browser version and chromedirver version match, the online version match table


The corresponding should be right

CodePudding user response:

Version if match, in 'C: \ P... The prefix r, r 'C: \ Pro...

CodePudding user response:


'C: \ \ Program Files \ (x86) Google, Chrome, Application, chromedriver. Exe')

CodePudding user response:

Python directory parameters there are three types of writing:
Path1=r "C: \ Windows \ temp \ readme. TXT"
Path2="c: \ \ Windows \ \ temp \ \ readme. TXT"
Path3="c:/Windows/temp/readme. TXT"
Among them:
Path1, "" for the special characters in the string, and after r into the original string, is not in the string "\ t", "\ r" to string escape
Path2: use a "" to cancel the second "" special escape function, is the "\ "
Path3: the use of forward slashes in directory separator can also be transferred to corresponding directory, and in python path3 approach also saves the backslash \ escape trouble
You have to do is change your directory parameters

CodePudding user response:

Chromedriver. Exe and. Py files in the same directory

CodePudding user response:

Version match, match an environment variable to the driver, so you don't have to write code path, browser=webdriver directly. The Chrome (),
  • Related