我尝试使用selenium连接示例网站,但面临以下错误。
Feb 22, 2017 1:19:46 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.Multimaps.transformValues(Lcom/google/common/collect/ListMultimap;Lcom/google/common/base/Function;)Lcom/google/common/collect/ListMultimap;
at com.google.common.net.MediaType.toString(MediaType.java:708)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:95)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:55)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:597)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:231)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:219)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:214)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:210)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:123)
at com.mozilla.service.ConncetMozilla.main(ConncetMozilla.java:11)
答案 0 :(得分:0)
您收到以下错误:java.lang.NoSuchMethodError: com.google.common.collect.Multimaps.transformValues
由于某种原因,你错过了包含transformValues
方法的jar。
可能的原因:
描述此错误的其他位置以及可能的修复: