Selenium and chromedriver installation under win10 + anaconda

selenium:
directly under anaconda's prompt

pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple

The installation of chromedriver
First look at your chrome version (must correspond)
chrome-Three points in the upper right corner-Help-About goole chrome
Insert picture description here
and then download address:
1, http://chromedriver.storage.googleapis.com/index.html
2 , Https://npm.taobao.org/mirrors/chromedriver/
Reference: https://www.cnblogs.com/lfri/p/10542797.html

You can find the corresponding version. Mine is version 81, then driver version 81 is fine. Click to select the system. Mine is win64, select win32 to
download. After decompression is an exe file, copy

Enter anaconda prompt

where python

Insert picture description here
Normally there should be two, I have reinstalled so there are three
I use anaconda so copy driver.exe to the script folder under anaconda
Test:

from selenium import webdriver
browser = webdriver.Chrome()
browser.get('http://www.baidu.com/')

Will automatically open chrome and open Baidu
Reference: https://www.cnblogs.com/technologylife/p/5829944.html

Published 14 original articles · praised 0 · visits 771

Guess you like

Origin blog.csdn.net/kunAUGUST/article/details/105409106