selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome version must be between 70 and 73 with ChromeDriver

前端 未结 11 1437
轮回少年
轮回少年 2021-02-05 08:03

I am trying to create a webcrawler using Selenium, but I get this error when I try to create the webdriver object.

selenium.common.exceptions.SessionNotCreatedEx         


        
11条回答
  •  被撕碎了的回忆
    2021-02-05 08:57

    You have to match the chromedriver version number and your web browser chrome version , If both of the version match then it is best.

    > For Example - 1- your web browser chrome version is 77 ( For checking your web browser chrome version got to your web browser help and then About Google Chrome there you will find your web browser chrome version ) . 2- Now download same version here 77 chromedriver from https://chromedriver.chromium.org/downloads . 3- Make google chrome as your default web browser . All done . Your code will run fine.

    from selenium import webdriver
    
    driver=webdriver.Chrome("chromedriver.exe")
    
    # Below line of code provide
    driver.get('http://python.org')
    
    html_doc=driver.page_source
    
    print("Html code of http://python.org web page :",html_doc)
    

提交回复
热议问题