java.lang.NoSuchMethodError:com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)与Selenium和java

java.lang.NoSuchMethodError:com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)与Selenium和java,java,selenium,selenium-webdriver,webdriver,nosuchmethoderror,Java,Selenium,Selenium Webdriver,Webdriver,Nosuchmethoderror,我正在学习eclipse中的selenium。我添加了所需的外部.jar文件,但在执行测试用例时仍然出现错误 您缺少chromedriver.exe 只需将路径添加到chrome驱动程序: System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver"); 你可以看到一个例子 希望这对您有所帮助!我在pom文件中使用maven surefire插件时出现了此错误。删除依赖项后,chrome驱动程序运行正常。您是否尝试添

我正在学习eclipse中的selenium。我添加了所需的外部.jar文件,但在执行测试用例时仍然出现错误


您缺少
chromedriver.exe

只需将路径添加到chrome驱动程序:

System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
你可以看到一个例子


希望这对您有所帮助!

我在pom文件中使用maven surefire插件时出现了此错误。删除依赖项后,chrome驱动程序运行正常。

您是否尝试添加
chromedriver.exe