selenium+chrome driver 报错处理 (Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 10.0.17763 x86_64)

Before practicing some with selenium test web pages on the chrome browser and the appropriate drivers installed and working properly.

But some of today run again when you open the page of the test program, an error occurs:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome version must be between 70 and 73
(Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 10.0.17763 x86_64)

Figure:

Solution:

1. Check the current chrome browser version 75.0.3770.142

Baidu 2.: chrome75 corresponding driver download and install, find the corresponding version 75.0.3770.8, reference articles for: https://blog.csdn.net/fox990152806/article/details/91881361

   

3. Download ChromeDriver, address: https://npm.taobao.org/mirrors/chromedriver/

After the download is complete, chromedriver.exe unzip the file and will be placed under the chrome browser root directory of the python path:

 

 

4. Configure Environment Variables

                                                                                                                                                                                                                                                

5. Verify successful installation NO

Run the following code can be normally open Baidu page, the installation was successful.

from selenium import webdriver

driver = webdriver.Chrome()       
driver.get('http://www.baidu.com')

 

Guess you like

Origin www.cnblogs.com/gzyxy/p/11226655.html