Selenium WebDriverException:消息:未知错误:无法根据未知错误确定加载状态:丢失或无效的"entry.level" [英] Selenium WebDriverException: Message: unknown error: cannot determine loading status from unknown error: missing or invalid 'entry.level'
问题描述
我有一个使用硒进行测试的脚本.现在甚至可以使用
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:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 245, in get
self.execute(Command.GET, {'url': url})
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 233, in execute
self.error_handler.check_response(response)
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\errorhandler.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和硒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)
JDK版本
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
的发行说明明确提到以下内容:
- You are using
chromedriver=2.29.461591
(which is as per the logs, though you mentionedChromedriver 2.35
in your question) - Release Notes of
chromedriver=2.29.461591
clearly mentions the following :
Supports Chrome v56-58
Supports Chrome v56-58
- 您正在使用
chrome=65.0.3315.3
- >
chromedriver=2.35
的发行说明明确提到以下内容: - You are using
chrome=65.0.3315.3
- Release Notes of
chromedriver=2.35
clearly mentions the following : - 您正在使用
Selenium Version 2.53.1
. - 您不知道您的
JDK version
. - You are using
Selenium Version 2.53.1
. - Your
JDK version
is unknown to us. - 将
JDK
升级到最新级别JDK Version 8 Update 151
. - 将
ChromeDriver
升级到ChromeDriver v2.35
级别. - 保持
Chrome
到Chrome v64.x
级别. (as per ChromeDriver v2.35 release notes
) - 将
Selenium
升级到当前级别Version 3.8.1
. - 从您的 IDE 中清洁项目工作区& 全部重建.
- 运行 CCleaner 工具以清除所有操作系统琐事.
- 如果您的Chrome基本版本过旧,请通过 Revo卸载程序来卸载Chrome. 并安装最新的GA发行版Chrome.
- 进行系统重启.
- 执行您的
Test
. - Upgrade
JDK
to recent levelsJDK Version 8 Update 151
. - Upgrade
ChromeDriver
toChromeDriver v2.35
level. - Keep
Chrome
toChrome v64.x
levels. (as per ChromeDriver v2.35 release notes
) - Upgrade
Selenium
to current levelsVersion 3.8.1
. - Clean the Project Workspace from your IDE & Rebuild All.
- Run CCleaner tool to wipe off all the OS chores.
- If your Chrome base version is too old, uninstall Chrome through Revo Uninstaller and install a recent GA Release version of Chrome.
- Take a System Reboot.
- Execute your
Test
.
Supports Chrome v62-64
Supports Chrome v62-64
这篇关于Selenium WebDriverException:消息:未知错误:无法根据未知错误确定加载状态:丢失或无效的"entry.level"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!