以下是错误:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: unexpected command response
(Session info: chrome=103.0.5060.53)
我正在使用适当的版本:
下面是脚本,它的工作是从普通用户数据目录打开一个网页并提供响应。
from seleniumwire import webdriver # Import from seleniumwire
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("user-data-dir=C:\\selenium")
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get('https://katalon.com/
')
for request in driver.requests:
if request.response:
print(
request.response.status_code,
)
发布于 2022-06-28 13:46:04
您需要将Google和Chrome驱动程序升级到104版:
chrome_options.binary_location
:
Windows - "C:\Program \Google\Chrome Beta\Application\chrome.exe“
MacOS -“/Applications/GoogleChromeBeta.app/Content/MacOS/Google”发布于 2022-06-28 21:00:15
无头色驱动程序浏览器有一个已知的问题,您可以阅读更多关于它的这里。
到目前为止,色度驱动器103或更低版本还没有修复。
编辑:这已经修复了Chromedriver 103。从这里下载chromedriver的最新103号版本。
你能做的是:
发布于 2022-06-30 12:16:09
chromeDriver 103版本的已经出现了问题,而Chromium社区也提出了同样的问题。
请在下面找到相同的bug ids,
https://bugs.chromium.org/p/chromedriver/issues/detail?id=4121&q=label%3AMerge-Request-103
您可以在上面的bug线程中看到所有的对话。
现在,在修复此问题之前,尝试“将Chrome浏览器降级为v102”和“下载Selenium Chrome驱动程序102”,并尝试运行您的脚本,因为这个问题发生在103个版本的中。
由于这个原因,Selenium社区已经关闭了这个问题,因为这个问题与Chrome团队有关。https://github.com/SeleniumHQ/selenium/issues/10799
https://stackoverflow.com/questions/72758996
复制相似问题