一尘不染

selenium出问题了

selenium

我在许多项目上使用selenium已有一段时间了。

使用正在运行的代码,我现在收到以下错误:

    C:\Users\%USER%\Miniconda\python.exe C:/Users/%USER%/PycharmProjects/c_r/quick_debug.py
    Traceback (most recent call last):
      File "C:/Users/%USER%/PycharmProjects/c_r/quick_debug.py", line 17, in <module>
        c.setUp()
      File "C:\Users\%USER%\PycharmProjects\c_r\c.py", line 40, in setUp
        self.driver = webdriver.Chrome()
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 67, in __init__
        desired_capabilities=desired_capabilities)
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 87, in __init__
        self.start_session(desired_capabilities, browser_profile)
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 141, in start_session
        'desiredCapabilities': desired_capabilities,
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 201, in execute
        self.error_handler.check_response(response)
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 181, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error: unrecognized Blink revision: 3b3c00f2d95c45cca18ab944acced413fb759311
      (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64)


    Process finished with exit code 1

在哪里c.setUp()

def setUp(self):
   self.driver = webdriver.Chrome()

再次-这是WAS正在运行的代码,我不确定如何处理此“无法识别的眨眼修订”错误。

什么都没有自觉改变。

谢谢你的指点


阅读 279

收藏
2020-06-26

共1个答案

一尘不染

快速浏览源代码后,我认为这是ChromeDriver与Chrome本身之间的兼容性问题-
我怀疑您的Chrome已自动更新,现在对于ChromeDriver 2.10来说太新了。换句话说: 更新ChromeDriver
,最新版本是2.19

2020-06-26