Selenium missing or invalid 'entry.level'

2019-01-26 03:19发布

I'm trying to run a selenium test which should work just fine (hasn't changed and used to work) but I'm getting this strange error.

System.InvalidOperationException : unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
  (Session info: chrome=63.0.3239.84)
  (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 10.0.15063 x86_64)
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 1015
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 849
   at OpenQA.Selenium.Remote.RemoteWebElement.Click() in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebElement.cs:line 337
...

What is this "missing or invalid 'entry.level'" error and how do I fix it?

4条回答
我想做一个坏孩纸
2楼-- · 2019-01-26 03:28

Please update all your maven dependencies:

  • maven-compiler-plugin
  • maven-surefire-plugin
  • webdrivermanager
  • selenium-chrome-driver
查看更多
小情绪 Triste *
3楼-- · 2019-01-26 03:43

I resolved this by updating my chrome driver to the latest version (v2.34 at the time of writing).

You can get the chromedriver here: https://sites.google.com/a/chromium.org/chromedriver/downloads

just download the .exe file then replace the chromedriver file in your project's selenium/bin folder.

查看更多
SAY GOODBYE
4楼-- · 2019-01-26 03:43

For Mac users, I made a

webdriver-manager clean

and then a

webdriver-manager update
查看更多
男人必须洒脱
5楼-- · 2019-01-26 03:44

Just make sure you've set the browser exe correctly, like to execute your tests on Chrome you would need chromedriver.exe in your path.

 System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")+
                "\\src\\main\\resources\\chromedriver.exe");
查看更多
登录 后发表回答