admin管理员组

文章数量:1124653

I've been spending a whole day with IntelliJ's rather useless AI, trying to troubleshoot a project using Maven, Cucumber and Selenium, where upgrading to Selenium 4.24 is causing everything to fail with the following error:

Step failed
java.lang.NoSuchMethodError: 'java.util.Optional     org.openqa.selenium.devtools.CdpEndpointFinder.getCdpEndPoint(org.openqa.selenium.remote.    http.HttpClient$Factory, java.URI)'
at org.openqa.selenium.chromium.ChromiumDriver.lambda$new$1(ChromiumDriver.java:112)
at java.base/java.util.Optional.flatMap(Optional.java:289)
at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:112)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:83)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:72)
at no.husbanken.e2e.rammeverk.selenium.Browser.opprettLokalBrowser(Browser.java:77)
at no.husbanken.e2e.rammeverk.selenium.Browser.init(Browser.java:60)
at e2e.support.Hooks.beforeAll(Hooks.java:83)
at e2e.support.Hooks.beforeEach(Hooks.java:41)

I'm going around in circles, because evetry attempt at troubleshooting seems to be centered arund "mvn dependency:tree".

The thing is, even though all the Selenium libraries are added to the pom.xml file, and they show up under "Extermal libraries" in IntelliJ, they do not show up in the dependency tree. Not even verbose.

If I don't upgrade Selenium, and keep running version 4.8, it works perfectly fine. Nothing containing "selenium" shows up in the dependency tree though, wether or not I upgrade.

Any hints or tips on how to move further? The AI is just repeating itself, and is completely unable to do anything else than spew out standard answers.

It should not be a chromedriver issue, since 4.24 takes care of this, and running selenium actually fails if I try using a manually downloaded chromedriver file, which is necessary if I use version 4.8.

本文标签: seleniumIntelliJ and Mavenunable to get the versions alignedStack Overflow