在Java中运行以下代码需要什么* .jar文件?
import org.openqa.selenium.firefox.FirefoxDriver;
public class OpenBrowser {
//@SuppressWarnings("unused")
public static void main(String[] args) {
FirefoxDriver w1=new FirefoxDriver();
w1.get("https://google.com");
}
}
以下是错误消息:
Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/remote/Capabilities
at OpenBrowser.main(OpenBrowser.java:8)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.remote.Capabilities
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
答案 0 :(得分:1)