1

Using clj-webdriver with seleniumhq and chromedriver(86) and when test starts I still get this issue.

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;
at org.openqa.selenium.chrome.ChromeOptions.asMap(ChromeOptions.java:292)
at org.openqa.selenium.MutableCapabilities.merge(MutableCapabilities.java:73)
at org.openqa.selenium.remote.DesiredCapabilities.merge(DesiredCapabilities.java:107)
at org.openqa.selenium.remote.DesiredCapabilities.merge(DesiredCapabilities.java:33)
at org.openqa.selenium.MutableCapabilities.setCapability(MutableCapabilities.java:96)
...

It says it cannot find method from com.google.guava but I can see that guava-25.0-jre.jar is fetched in project dependencies but it is somehow ignored.

Also weird thing is that from stacktrace ChromeOptions.asMap() is refering to line 292 in ChromeOptions.java but when I check that class there's no such line so it looks like it is refering to different version of selenium-chrome-driver but then again in deps there's 3.141.59 version.

Checked all the dependencies and cannot seem to find place where old guava or old selenium-chrome-driver should live.

Dependencies looks like:

:dependencies [
[org.seleniumhq.selenium/selenium-java "3.141.59"]
[org.clojure/clojure "1.10.1"]
[clj-webdriver "0.7.2" :exclusions [
     [org.seleniumhq.selenium/selenium-server]
     [org.seleniumhq.selenium/selenium-java]
     [org.seleniumhq.selenium/selenium-remote-driver]
     [com.codeborne/phantomjsdriver]]]
[org.seleniumhq.selenium/htmlunit-driver "2.44.0"]
[com.google.guava/guava "25.0-jre"]
[clj-http "3.10.3"]
[cheshire "5.10.0"]
[clj-time "0.15.2"]]

I spent on this like whole day and running out of ideas. Any ideas why this error appears?

DarkPjotr
  • 11
  • 1

0 Answers0