Selenium WebDriverException: Message: unknown erro

2019-07-20 03:19发布

I have a script which uses selenium for testing. Now even opening a Google page using

driver.get(url) # url = Google homepage url

is giving me below error

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)

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)

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)

3条回答
相关推荐>>
2楼-- · 2019-07-20 03:54

That error means your chrome browser is not compatible with the web driver. If you are using Linux, then simply execute the following command. sudo apt-get update

查看更多
beautiful°
3楼-- · 2019-07-20 04:00

Go to http://chromedriver.chromium.org/downloads

copy the download link according to your OS

wget -N paste_the_link_you_copied

unzip it using below command

unzip chromedriver_linux64.zip

Give the permission by the below command

chmod +x chromedriver

Then follow the below commands, if it says already exists (probabily old version) then go to that path (/usr/local/bin/chromedriver and /usr/bin/chromedriver) and delete chromedriver and run the commands again

sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

Hope this helps. Thanks

查看更多
孤傲高冷的网名
4楼-- · 2019-07-20 04:05

The error says it all :

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 :

  • You are using chromedriver=2.29.461591 (which is as per the logs, though you mentioned Chromedriver 2.35 in your question)
  • Release Notes of chromedriver=2.29.461591 clearly mentions the following :

Supports Chrome v56-58

  • You are using chrome=65.0.3315.3
  • Release Notes of chromedriver=2.35 clearly mentions the following :

Supports Chrome v62-64

  • You are using Selenium Version 2.53.1.
  • Your JDK version is unknown to us.

Solution

  • Upgrade JDK to recent levels JDK Version 8 Update 151.
  • Upgrade ChromeDriver to ChromeDriver v2.35 level.
  • Keep Chrome to Chrome v64.x levels. (as per ChromeDriver v2.35 release notes)
  • Upgrade Selenium to current levels Version 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.
查看更多
登录 后发表回答