• Chrome浏览器之 webdriver(Chrome version must be >= 63.0.3239.0)


    # coding = utf-8
    
    from selenium import webdriver
    
    driver = webdriver.Chrome()
    driver.get('http://www.baidu.com')
    print (driver.title)  # 把页面title 打印出来
    driver.quit()
    

      运行上续代码报错:

    Traceback (most recent call last):
    File "D:/aasoftcfl/python/cflproject/projectcfl22chrome.py", line 5, in <module>
    driver = webdriver.Chrome()
    File "D:aasoftcflpythonlibsite-packagesselenium-3.11.0-py3.6.eggseleniumwebdriverchromewebdriver.py", line 75, in __init__
    desired_capabilities=desired_capabilities)
    File "D:aasoftcflpythonlibsite-packagesselenium-3.11.0-py3.6.eggseleniumwebdriver emotewebdriver.py", line 154, in __init__
    self.start_session(desired_capabilities, browser_profile)
    File "D:aasoftcflpythonlibsite-packagesselenium-3.11.0-py3.6.eggseleniumwebdriver emotewebdriver.py", line 243, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
    File "D:aasoftcflpythonlibsite-packagesselenium-3.11.0-py3.6.eggseleniumwebdriver emotewebdriver.py", line 312, in execute
    self.error_handler.check_response(response)
    File "D:aasoftcflpythonlibsite-packagesselenium-3.11.0-py3.6.eggseleniumwebdriver emoteerrorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.SessionNotCreatedException: Message: session not created exception: Chrome version must be >= 63.0.3239.0
    (Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 6.1.7601 SP1 x86_64)

    查看浏览器版本58.****,所以升级浏览器解决了问题;

    解决方法:升级Chrome浏览器

  • 相关阅读:
    统计一段文字中出现频率最高的10个单词(c语言)
    java之过滤器Filter (应用场景)
    java之过滤器Filter
    Spring AOP
    清华大学iCenter区块链公开课 第二节
    学习区块链 第一节 精通比特币
    使用Shiro登录成功后,跳转到之前访问的页面实现
    windows下系统移植到linux下出现的问题
    mysql分页查询
    安卓开发随笔
  • 原文地址:https://www.cnblogs.com/shishibuwan/p/9072113.html
Copyright © 2020-2023  润新知