chromedriver unknown error: Runtime.executionContextCreated has invalid 'context' chromedriver unknown error: Runtime.executionContextCreated has invalid 'context'

chromedriver unknown error: Runtime.executionContextCreated has invalid 'context'

Phenomenon : selenium uses chromedriver to drive chrome automation to report an error unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"11740.1","isDefault":true},"id":1,"name ”:””,”origin”:”://”} 
(Session info: chrome=54.0.2840.71) 
(Driver info: chromedriver=2.9.248307,platform=Linux

Reason : The version of chromedriver does not match the version of chrome

Solution: 
chromedriver download address  http://chromedriver.storage.googleapis.com/index.html 
Note that the version number 2.9 is not the latest, and now the latest is 2.29, which is adapted to chrome 58, the matching relationship between chromedriver and chrome Look in ntoes.txt in the download directory. After the download is complete, unzip the file and put it in /usr/bin/

test:

#!/usr/bin/python3
# -*- coding:utf-8 -*-

"""Here is docstring"""

# __author__ = c08762

from selenium import webdriver


driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
driver.find_element_by_id('kw').send_keys('selenium2')
driver.find_element_by_id('su').click()
Copyright statement: Original article, please indicate the source for reprinting. https://blog.csdn.net/c08762/article/details/70339587

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325647150&siteId=291194637