java org.openqa.selenium.WebDriverException:未知错误:无法确定加载状态
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48473618/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status
提问by Harish Kannan
I am new to Selenium and need some trail to find root cause of the below error.
我是 Selenium 的新手,需要一些线索来找到以下错误的根本原因。
Selenium version - 3.5.3 ChromeDriver version - 2.29.4 Chrome version - 63
Selenium 版本 - 3.5.3 ChromeDriver 版本 - 2.29.4 Chrome 版本 - 63
org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
(Session info: chrome=63.0.3239.132)
(Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'BADRI-HP', ip: '---.---.-.---', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.29.461591 (62ebf098771772160f391d75e589dc567915b233), userDataDir=C:\Users\Badri\AppData\Local\Temp\scoped_dir45280_30736}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=63.0.3239.132, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=XP, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
Session ID: 60b98ca106d00b50963c47e02276c40b
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:370)
at naukri.ProfileUpdate.login(ProfileUpdate.java:19)
at testScripts.NewTest.f(NewTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
采纳答案by DebanjanB
The error says it all :
错误说明了一切:
org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
Your main issue is the version compatibilityamong the binaries you are using as follows :
您的主要问题是您使用的二进制文件之间的版本兼容性如下:
- You are using
chromedriver=2.29.461591
- Release Notes of
chromedriver=2.29.461591
clearly mentions the following :
- 您正在使用
chromedriver=2.29.461591
- 的发行说明
chromedriver=2.29.461591
清楚地提到了以下内容:
Supports Chrome v56-58
Supports Chrome v56-58
- You are using
chrome=63.x
- Release Notes of
ChromeDriver v2.34
clearly mentions the following :
- 您正在使用
chrome=63.x
- 的发行说明
ChromeDriver v2.34
清楚地提到了以下内容:
Supports Chrome v61-63
Supports Chrome v61-63
- Release Notes of
ChromeDriver v2.35
clearly mentions the following :
- 的发行说明
ChromeDriver v2.35
清楚地提到了以下内容:
Supports Chrome v62-64
Supports Chrome v62-64
- You are using
Selenium Version 3.5.3
. - Your
JDK version
is1.8.0_131
.
- 您正在使用
Selenium Version 3.5.3
. - 你的
JDK version
是1.8.0_131
。
So there is a clear mismatch between the chromedriverversion (v2.29.4) [which supports Chrome v56-58] with the Chrome Browserversion (v63.x) [supported by ChromeDriver v2.34minimum]
因此,chromedriver版本 ( v2.29.4) [支持Chrome v56-58] 与Chrome 浏览器版本 ( v63.x) [ ChromeDriver v2.34最低支持]之间存在明显的不匹配
Solution
解决方案
- Upgrade
JDK
to recent levelsJDK Version 8 Update 151
. - Upgrade
Selenium
to current levelsVersion 3.8.1
. - Upgrade
ChromeDriver
toChromeDriver v2.35
level. Keep
Chrome
toChrome v64.x
levels. (as per ChromeDriver v2.35 release notes
)Execute your
Test
.
- 升级
JDK
到最近的水平JDK Version 8 Update 151
。 - 升级
Selenium
到当前级别Version 3.8.1
。 - 升级
ChromeDriver
到ChromeDriver v2.35
水平。 保持
Chrome
到Chrome v64.x
水平。(as per ChromeDriver v2.35 release notes
)执行您的
Test
.
回答by Chintamani Manjare
I fixed this issue after updating chrome driver to 2.38 with chrome version 65.
在使用 chrome 65 版将 chrome 驱动程序更新到 2.38 后,我解决了这个问题。
https://chromedriver.storage.googleapis.com/index.html?path=2.38/
https://chromedriver.storage.googleapis.com/index.html?path=2.38/
回答by hiren
It seems that the ChromeDriver
need to be updated. For chrome=63.0.3239.132
, you might want to use ChromeDriver v 2.35
. You can download the same for your system from:
看来ChromeDriver
需要更新了。对于chrome=63.0.3239.132
,您可能想要使用ChromeDriver v 2.35
. 您可以从以下位置为您的系统下载相同的内容:
Hope it helps.
希望能帮助到你。