我有一个使用 selenium 进行测试的脚本.现在甚至使用
I have a script which uses selenium for testing. Now even opening a Google page using
driver.get(url) # url = Google homepage url
给我下面的错误
driver.get("https://my.gumtree.com/login")
File "C:Python34libsite-packagesseleniumwebdriver
emotewebdriver.py", line 245, in get
self.execute(Command.GET, {'url': url})
File "C:Python34libsite-packagesseleniumwebdriver
emotewebdriver.py", line 233, in execute
self.error_handler.check_response(response)
File "C:Python34libsite-packagesseleniumwebdriver
emoteerrorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
(Session info: chrome=65.0.3315.3)
(Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 10.0.16299 x86_64)
我有 Google chrome 版本 65、Chromedriver 2.35 和 selenium 2.53.1
I have Google chrome version 65, Chromedriver 2.35 and selenium 2.53.1
我根据其他类似问题中提到的解决方案尝试了不同的版本组合(在下表中提到),但没有任何效果.
I tried different version combinations(mentioned in below table) as per solutions mentioned in other similar questions but nothing worked.
Selenium Chrome Chromedriver
2.53.0 63 2.33
2.53.1 65(latest) 2.34
3.6.0 2.35(latest)
3.7.0
3.8.0
3.8.1(latest)
编辑 1:JDK 版本
EDIT 1: JDK version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
错误说明了一切:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
您的主要问题是您使用的二进制文件之间的版本兼容性,如下所示:
Your main issue is the version compatibility among the binaries you are using as follows :
chromedriver=2.29.461591
(根据日志,尽管您在问题中提到了 Chromedriver 2.35
)chromedriver=2.29.461591
明确提及以下内容:chromedriver=2.29.461591
(which is as per the logs, though you mentioned Chromedriver 2.35
in your question)chromedriver=2.29.461591
clearly mentions the following :支持 Chrome v56-58
chrome=65.0.3315.3
chromedriver=2.35
的发行说明 明确提及以下内容:
chrome=65.0.3315.3
chromedriver=2.35
clearly mentions the following :支持 Chrome v62-64
Selenium 版本 2.53.1
.JDK 版本
.JDK
升级到最新级别 JDK 版本 8 更新 151
.ChromeDriver
升级到 ChromeDriver v2.35
级别.Chrome
保持在 Chrome v64.x
级别.(根据 ChromeDriver v2.35 发行说明
)Selenium
升级到当前级别 Version 3.8.1
.测试
.JDK
to recent levels JDK Version 8 Update 151
.ChromeDriver
to ChromeDriver v2.35
level.Chrome
to Chrome v64.x
levels. (as per ChromeDriver v2.35 release notes
)Selenium
to current levels Version 3.8.1
.Test
.这篇关于Selenium WebDriverException:消息:未知错误:无法根据未知错误确定加载状态:缺少或无效的“entry.level"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!