selenium drive chrome browser issues

 

1. Download the version corresponding to the local chrome chromedriver.exe, download address is http://npm.taobao.org/mirrors/chromedriver/

2. Place the unzipped file into the same directory with the python.exe

 

 

 Or home environment variable has been configured 

 Or any directory, but requires the use of a specified drive path

# The following code may be used to test whether the normal driving 
from
Selenium Import the webdriver Import Time Driver = webdriver.Chrome ( " E: /chromedriver.exe " ) # Only the third case only need to specify the path driver.get ( " HTTPS: // WWW .baidu.com / " ) the time.sleep ( . 5 ) driver.quit ()

 

Guess you like

Origin www.cnblogs.com/wang-mengmeng/p/11455926.html